OK. How come when i do this. With a button and a textbox using a connection,data adapter, dataset with this in the button and this was just to extract a field into a textbox.
Visual Basic:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
da.Fill(DataSet11)
TextBox1.Text = Convert.ToString(DataSet11.tblName.Rows(0)("fn"))
End Sub
I get this:
Server Error in '/data' Application.
--------------------------------------------------------------------------------
The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\data\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
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: The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\data\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
Source Error:
Line 117:
Line 118: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Line 119: da.Fill(DataSet11)
Line 120: TextBox1.Text = Convert.ToString(DataSet11.tblName.Rows(0)("fn"))
Line 121:
Source File: c:\inetpub\wwwroot\data\WebForm1.aspx.vb Line: 119
Stack Trace:
[OleDbException (0x80004005): The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\data\db1.mdb'. It is already opened exclusively by another user, or you need permission to view its data.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
data.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\data\WebForm1.aspx.vb:119
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.5