Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Error on dataAdapter

Error on dataAdapter

Scheduled Pinned Locked Moved ASP.NET
databasecomdesignsysadmin
10 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ibok23
    wrote on last edited by
    #1

    Could someone tell me what I am doing wrong? I am trying to add access into visual basic. I have changed the server for access (Microsoft Jet 4.0 OLE DB Provider). I have done the test connection - all is well. I have added the dataGrid to the web form- Named it MyDG1. I clicked on OldDbDataAdapter and added the connection where the access page is. I have done the Query builder, generate dataset (which I called MyDS). I selected the the dataset and Previewed it - all is well when I filled it in. I assigned a table to the DataView - Shopping Products (my access page). I assigned the DataSource property on the DataGrid as DataView1. In the page_load handler I added OleDbDataAdaper1.Fill(MyDS1) Page.DataBind() I build it - all is good; however when I view in browser that is when I get my error. Here is my error. Server Error in '/WebApplication1/WebApplication1/Unit5' Application. -------------------------------------------------------------------------------- Unspecified error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Unspecified error Source Error: Line 83: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Line 84: 'Put user code to initialize the page here Line 85: OleDbDataAdapter1.Fill(MyDS1) Line 86: Page.DataBind() Line 87: End Sub Source File: c:\inetpub\wwwroot\WebApplication1\WebApplication1\Unit5\WebForm1.aspx.vb Line: 85 Stack Trace: [OleDbException (0x80004005): Unspecified error] System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvider() +57 System.Data.OleDb.OleDbConnection.Open() +203 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 Unit5.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebApplication1\Unit5\WebForm1.aspx.vb:85 System.Web.UI.Control.onload(EventArg

    V 1 Reply Last reply
    0
    • I ibok23

      Could someone tell me what I am doing wrong? I am trying to add access into visual basic. I have changed the server for access (Microsoft Jet 4.0 OLE DB Provider). I have done the test connection - all is well. I have added the dataGrid to the web form- Named it MyDG1. I clicked on OldDbDataAdapter and added the connection where the access page is. I have done the Query builder, generate dataset (which I called MyDS). I selected the the dataset and Previewed it - all is well when I filled it in. I assigned a table to the DataView - Shopping Products (my access page). I assigned the DataSource property on the DataGrid as DataView1. In the page_load handler I added OleDbDataAdaper1.Fill(MyDS1) Page.DataBind() I build it - all is good; however when I view in browser that is when I get my error. Here is my error. Server Error in '/WebApplication1/WebApplication1/Unit5' Application. -------------------------------------------------------------------------------- Unspecified error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Unspecified error Source Error: Line 83: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Line 84: 'Put user code to initialize the page here Line 85: OleDbDataAdapter1.Fill(MyDS1) Line 86: Page.DataBind() Line 87: End Sub Source File: c:\inetpub\wwwroot\WebApplication1\WebApplication1\Unit5\WebForm1.aspx.vb Line: 85 Stack Trace: [OleDbException (0x80004005): Unspecified error] System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvider() +57 System.Data.OleDb.OleDbConnection.Open() +203 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 Unit5.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebApplication1\Unit5\WebForm1.aspx.vb:85 System.Web.UI.Control.onload(EventArg

      V Offline
      V Offline
      VenkatFor NET
      wrote on last edited by
      #2

      first thing we can find out about the error is to put a catch block and verify what exactly is the error. looks like you dont have any exception handler. and another thing you may have to look in your case is, you are using a typed dataset. so, when you try to fill it using adapter, it will have to fill in according to the tables structures defined. if the the 'SQL' using which you are filling dataapater does not follow the schema in typed dataset, it may fail. verify. Bhaskara

      I 1 Reply Last reply
      0
      • V VenkatFor NET

        first thing we can find out about the error is to put a catch block and verify what exactly is the error. looks like you dont have any exception handler. and another thing you may have to look in your case is, you are using a typed dataset. so, when you try to fill it using adapter, it will have to fill in according to the tables structures defined. if the the 'SQL' using which you are filling dataapater does not follow the schema in typed dataset, it may fail. verify. Bhaskara

        I Offline
        I Offline
        ibok23
        wrote on last edited by
        #3

        how do I check to see if this is the case: "and another thing you may have to look in your case is, you are using a typed dataset. so, when you try to fill it using adapter, it will have to fill in according to the tables structures defined. if the the 'SQL' using which you are filling dataapater does not follow the schema in typed dataset, it may fail. verify." and how do i fix this. Sorry, I am just learning. :confused: Thanks, Thank you, ibok23

        V 1 Reply Last reply
        0
        • I ibok23

          how do I check to see if this is the case: "and another thing you may have to look in your case is, you are using a typed dataset. so, when you try to fill it using adapter, it will have to fill in according to the tables structures defined. if the the 'SQL' using which you are filling dataapater does not follow the schema in typed dataset, it may fail. verify." and how do i fix this. Sorry, I am just learning. :confused: Thanks, Thank you, ibok23

          V Offline
          V Offline
          VenkatFor NET
          wrote on last edited by
          #4

          i think for dataadapter, there is a validation event which will fire when the incoming data does not comply with the schema. not sure thouhgh. please check on the validating events Bhaskara

          I 1 Reply Last reply
          0
          • V VenkatFor NET

            i think for dataadapter, there is a validation event which will fire when the incoming data does not comply with the schema. not sure thouhgh. please check on the validating events Bhaskara

            I Offline
            I Offline
            ibok23
            wrote on last edited by
            #5

            I am sorry, I am new at Visual basic and ASP.NET. How do I check the validating events? Thank you, ibok23

            V 1 Reply Last reply
            0
            • I ibok23

              I am sorry, I am new at Visual basic and ASP.NET. How do I check the validating events? Thank you, ibok23

              V Offline
              V Offline
              VenkatFor NET
              wrote on last edited by
              #6

              see if this helps http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskvalidatingdataduringrowchanges.asp Bhaskara

              I 1 Reply Last reply
              0
              • V VenkatFor NET

                see if this helps http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskvalidatingdataduringrowchanges.asp Bhaskara

                I Offline
                I Offline
                ibok23
                wrote on last edited by
                #7

                ok, THis is helpful; however, i need to check out a folder to see if the read/write permissions for userAccount are not enabled in a certain folder. here is the folder Document settings\ServerName\ASPNET\LocalSettings\Temp I am not sure how to find this folder. The server Name is the server that I am using. is that where I went to change to MIcrosoft Jet 4.0 (because of access). I am sorry, I am lost. Thank you, ibok23

                V 1 Reply Last reply
                0
                • I ibok23

                  ok, THis is helpful; however, i need to check out a folder to see if the read/write permissions for userAccount are not enabled in a certain folder. here is the folder Document settings\ServerName\ASPNET\LocalSettings\Temp I am not sure how to find this folder. The server Name is the server that I am using. is that where I went to change to MIcrosoft Jet 4.0 (because of access). I am sorry, I am lost. Thank you, ibok23

                  V Offline
                  V Offline
                  VenkatFor NET
                  wrote on last edited by
                  #8

                  i am not able to understand what you are trying to do here. please explain more Bhaskara

                  I 1 Reply Last reply
                  0
                  • V VenkatFor NET

                    i am not able to understand what you are trying to do here. please explain more Bhaskara

                    I Offline
                    I Offline
                    ibok23
                    wrote on last edited by
                    #9

                    ok, I'll start from the beginning. I am trying to add access within Visual Basic. I followed the instructions that was given in my book. I also looked over the site that you suggested, it basically told me almost the exact same steps. The only difference was that it said to be in Visual c#. My book, which I have to go by, says to be in visual basic. Thank you, ibok23

                    I 1 Reply Last reply
                    0
                    • I ibok23

                      ok, I'll start from the beginning. I am trying to add access within Visual Basic. I followed the instructions that was given in my book. I also looked over the site that you suggested, it basically told me almost the exact same steps. The only difference was that it said to be in Visual c#. My book, which I have to go by, says to be in visual basic. Thank you, ibok23

                      I Offline
                      I Offline
                      ibok23
                      wrote on last edited by
                      #10

                      The first set of error said that I was not authorized or someone else was using that folder. So I found out to do . Now the error is this: Server Error in '/WebApplication1/WebApplication1/Chapter7Case345' Application. -------------------------------------------------------------------------------- Unspecified error Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Unspecified error Source Error: Line 83: Line 84: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Line 85: DA1.Fill(MyDS1) Line 86: Page.DataBind() Line 87: End Sub Source File: c:\inetpub\wwwroot\WebApplication1\WebApplication1\Chapter7Case345\WebForm1.aspx.vb Line: 85 Stack Trace: [OleDbException (0x80004005): Unspecified error] System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20 System.Data.OleDb.OleDbConnection.InitializeProvider() +57 System.Data.OleDb.OleDbConnection.Open() +203 System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38 Chapter7Case345.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebApplication1\Chapter7Case345\WebForm1.aspx.vb:85 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573 So I also went back and underneath system web I put I still get the above error. Now in http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q825738 it also says to: In Windows Explorer, locate the following folder: Document settings\ServerName\ASPNET\Local settings\Temp

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups