Error on dataAdapter
-
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
-
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
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
-
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
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
-
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
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 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 am sorry, I am new at Visual basic and ASP.NET. How do I check the validating events? Thank you, 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
-
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
i am not able to understand what you are trying to do here. please explain more Bhaskara
-
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
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
-
i am not able to understand what you are trying to do here. please explain more Bhaskara
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