Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I'm a newbee in vb.net

 

I want to display a datagrid on a webform

I make a connection with a access database using a dataset.

 

 

If i use it in a windows form then it works perfect, but if i want to run the same on a webform the following error ocures:

 

 

Server Error in '/test' Application.

--------------------------------------------------------------------------------

 

De Microsoft Jet-database-engine kan het bestand C:\Inetpub\wwwroot\Test\mdb\FormesGryspa.mdb niet openen. Het is exclusief geopend door een andere gebruiker of u hebt een machtiging nodig om de gegevens te kunnen bekijken.

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: De Microsoft Jet-database-engine kan het bestand C:\Inetpub\wwwroot\Test\mdb\FormesGryspa.mdb niet openen. Het is exclusief geopend door een andere gebruiker of u hebt een machtiging nodig om de gegevens te kunnen bekijken.

 

Source Error:

 

Line 130: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Line 131: 'Put user code to initialize the page here

Line 132: OleDbDataAdapter1.Fill(DsFormes1)

Line 133: DataGrid1.DataBind()

Line 134: End Sub

 

 

Source File: c:\inetpub\wwwroot\Test\WebForm1.aspx.vb Line: 132

 

Stack Trace:

 

[OleDbException (0x80004005): De Microsoft Jet-database-engine kan het bestand C:\Inetpub\wwwroot\Test\mdb\FormesGryspa.mdb niet openen. Het is exclusief geopend door een andere gebruiker of u hebt een machtiging nodig om de gegevens te kunnen bekijken.]

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)

Test.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Test\WebForm1.aspx.vb:132

System.Web.UI.Control.OnLoad(EventArgs e)

System.Web.UI.Control.LoadRecursive()

System.Web.UI.Page.ProcessRequestMain()

 

 

 

 

 

Thanks

Posted

Hi,

 

Proberly i think there is a security problem.

The error tells me that the jet-engine not can be opened because he is opened by another user or i have not the access permissions.

 

a copy of my code:

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

DsFormes1.Clear()

OleDbDataAdapter1.Fill(DsFormes1)

DataGrid1.DataSource = DsFormes1

DataGrid1().DataBind()

End Sub

 

Thanks for yhe help

Posted

No, there is no other or previous connection with the database.

Its strange because its works perfect on a windows form.

I have put the mode = shary deny none into my code but the problems are not changed.

 

Is it normal that my mdb folders location(c:\inetpub\wwwroot...)

is different as my webform, and my webform open in my browser on Localhost...

 

 

Thanks for reply

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...