473,287 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

trouble with web forms

im trying to get a table from a microsoft access database on a simple
web form using visual basic.net. ive set up the database as a file
dsn.

this is my connection string:

DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
(*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
Files\ODBC\Data
Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
works fine when i try it with a windows form, however with the webform,
when i try it, i get the following errors because of line69 :
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver] Could not use '(unknown)'; file already in use. ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use.

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.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use. ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.

Source Error:

Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 68: DataSet11.Clear()
Line 69: OdbcDataAdapter1.Fill(DataSet11)
Line 70: DataGrid1.DataBind()
Line 71: End Sub
Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69

Stack Trace:

[OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver]General error Unable to open registry key 'Temporary (volatile)
Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.]
System.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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)
TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

This is my code:

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.DataSet11 = New TestWeb1.DataSet1
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).BeginIni t()
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
CompanyName, Phone FROM Shippers"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO
Shippers(CompanyName, Phone) VALUES (?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("CompanyName",
System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("Phone",
System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
"PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Pro gram Files\Microsoft
Office\OFFICE11" & _
"\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
Sources\test2.dsn;Drive" & _
"rId=25;DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
"CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
Access Driver (*.mdb)};" & _
"MaxBufferSize=2048;Threads=3;SafeTransactions =0"
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "Shippers", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
System.Data.Common.DataColumnMapping("CompanyName" , "CompanyName"), New
System.Data.Common.DataColumnMapping("Phone", "Phone")})})
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New
System.Globalization.CultureInfo("en-IE")
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).EndInit( )

End Sub
Protected WithEvents OdbcSelectCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcInsertCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcConnection1 As
System.Data.Odbc.OdbcConnection
Protected WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Protected WithEvents DataSet11 As TestWeb1.DataSet1
Protected WithEvents DataGrid1 As
System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
OdbcDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
End Sub

End Class
iv been tryin to sort this for a couple of days but am completely at a
loss as to how to sort this. Can anyone help?

Feb 16 '06 #1
2 1485
Well, I could be wrong since I haven't seen every detail of your setup or
code, but that looks like a very strange connection string. Here are some
things I would check:

1. Directories rarely start with the drive letter (C:) when dealing with the
web.
2. Your connection string looks much more complicated than necessary. Here
is the line that I use to create my connections in all the websites I have
created that use Access databases (and they have been on different servers,
so unless you have a strange setup I'm guessing it will work for you too):

Dim myconnection As New
OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0; DATA SOURCE=" &
Server.MapPath("/mydatabase.mdb"))

Just modify the last part to be the correct path to your *.mdb file.

3. Check the permissions on the *.mdb file to make sure ASPNET has
permission to access it.

Although something that I am kind of getting the impression of is that you
require a more full-featured and secure database, Access was not really
intended for web-related stuff. If you have a very big company or plan to
use the database heavily, I would put in the effort and money to buy either
Oracle or SQL Server (you would probably prefer SQL Server since you are
coming from Access). I am only a student, but ASP.NET and Web Development
are my areas of concentration and these are things I have been taught and
gained through experience and articles I have read. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

<so*******@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
im trying to get a table from a microsoft access database on a simple
web form using visual basic.net. ive set up the database as a file
dsn.

this is my connection string:

DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
(*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
Files\ODBC\Data
Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
works fine when i try it with a windows form, however with the webform,
when i try it, i get the following errors because of line69 :
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver] Could not use '(unknown)'; file already in use. ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use.

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.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use. ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.

Source Error:

Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 68: DataSet11.Clear()
Line 69: OdbcDataAdapter1.Fill(DataSet11)
Line 70: DataGrid1.DataBind()
Line 71: End Sub
Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69

Stack Trace:

[OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver]General error Unable to open registry key 'Temporary (volatile)
Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.]
System.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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)
TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

This is my code:

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.DataSet11 = New TestWeb1.DataSet1
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).BeginIni t()
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
CompanyName, Phone FROM Shippers"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO
Shippers(CompanyName, Phone) VALUES (?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("CompanyName",
System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("Phone",
System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
"PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Pro gram Files\Microsoft
Office\OFFICE11" & _
"\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
Sources\test2.dsn;Drive" & _
"rId=25;DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
"CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
Access Driver (*.mdb)};" & _
"MaxBufferSize=2048;Threads=3;SafeTransactions =0"
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "Shippers", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
System.Data.Common.DataColumnMapping("CompanyName" , "CompanyName"), New
System.Data.Common.DataColumnMapping("Phone", "Phone")})})
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New
System.Globalization.CultureInfo("en-IE")
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).EndInit( )

End Sub
Protected WithEvents OdbcSelectCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcInsertCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcConnection1 As
System.Data.Odbc.OdbcConnection
Protected WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Protected WithEvents DataSet11 As TestWeb1.DataSet1
Protected WithEvents DataGrid1 As
System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
OdbcDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
End Sub

End Class
iv been tryin to sort this for a couple of days but am completely at a
loss as to how to sort this. Can anyone help?

Feb 17 '06 #2
Do you have Office installed on your server?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

<so*******@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
im trying to get a table from a microsoft access database on a simple
web form using visual basic.net. ive set up the database as a file
dsn.

this is my connection string:

DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;DefaultDir=C :\Program
Files\Microsoft Office\OFFICE11\SAMPLES;Driver={Microsoft Access Driver
(*.mdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Program Files\Common
Files\ODBC\Data
Sources\test2.dsn;MaxBufferSize=2048;MaxScanRows=8 ;PageTimeout=5;SafeTransactions=0;Threads=3;UID=ad min;UserCommitSync=Yes;
works fine when i try it with a windows form, however with the webform,
when i try it, i get the following errors because of line69 :
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC
Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver] Could not use '(unknown)'; file already in use. ERROR
[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable
to open registry key 'Temporary (volatile) Jet DSN for process 0x3a4
Thread 0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use.

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.Odbc.OdbcException: ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC
Microsoft Access Driver]General error Unable to open registry key
'Temporary (volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC
0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]
Could not use '(unknown)'; file already in use. ERROR [HY000]
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open
registry key 'Temporary (volatile) Jet DSN for process 0x3a4 Thread
0x720 DBC 0x437aa4 Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft
Access Driver]General error Unable to open registry key 'Temporary
(volatile) Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.

Source Error:

Line 67: Private Sub Page_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Line 68: DataSet11.Clear()
Line 69: OdbcDataAdapter1.Fill(DataSet11)
Line 70: DataGrid1.DataBind()
Line 71: End Sub
Source File: c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb Line: 69

Stack Trace:

[OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access
Driver]General error Unable to open registry key 'Temporary (volatile)
Jet DSN for process 0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error
Unable to open registry key 'Temporary (volatile) Jet DSN for process
0x3a4 Thread 0x720 DBC 0x437aa4 Jet'.
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use.]
System.Data.Odbc.OdbcConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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)
TestWeb1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\TestWeb1\WebForm1.aspx.vb:69
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

This is my code:

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.DataSet11 = New TestWeb1.DataSet1
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).BeginIni t()
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ShipperID,
CompanyName, Phone FROM Shippers"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO
Shippers(CompanyName, Phone) VALUES (?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("CompanyName",
System.Data.Odbc.OdbcType.NVarChar, 40, "CompanyName"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("Phone",
System.Data.Odbc.OdbcType.NVarChar, 24, "Phone"))
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
"PageTimeout=5;MaxScanRows=8;DefaultDir=C:\Pro gram Files\Microsoft
Office\OFFICE11" & _
"\SAMPLES;FILEDSN=C:\Program Files\Common Files\ODBC\Data
Sources\test2.dsn;Drive" & _
"rId=25;DBQ=C:\Program Files\Microsoft
Office\OFFICE11\SAMPLES\Northwind.mdb;User" & _
"CommitSync=Yes;FIL=MS Access;UID=admin;Driver={Microsoft
Access Driver (*.mdb)};" & _
"MaxBufferSize=2048;Threads=3;SafeTransactions =0"
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "Shippers", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ShipperID", "ShipperID"), New
System.Data.Common.DataColumnMapping("CompanyName" , "CompanyName"), New
System.Data.Common.DataColumnMapping("Phone", "Phone")})})
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New
System.Globalization.CultureInfo("en-IE")
CType(Me.DataSet11,
System.ComponentModel.ISupportInitialize).EndInit( )

End Sub
Protected WithEvents OdbcSelectCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcInsertCommand1 As
System.Data.Odbc.OdbcCommand
Protected WithEvents OdbcConnection1 As
System.Data.Odbc.OdbcConnection
Protected WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Protected WithEvents DataSet11 As TestWeb1.DataSet1
Protected WithEvents DataGrid1 As
System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
OdbcDataAdapter1.Fill(DataSet11)
DataGrid1.DataBind()
End Sub

End Class
iv been tryin to sort this for a couple of days but am completely at a
loss as to how to sort this. Can anyone help?

Feb 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: gregory_may | last post by:
I have an application I created called "JpegViewer.exe". It simply loads a Jpeg file and displays in on the screen. It works great, in my lab. When I am using it at a customer site, things...
1
by: lawrence | last post by:
This PHP function prints out a bunch of Javascript (as you can see). This is all part of the open source weblog software of PDS (www.publicdomainsoftware.org). We had this javascript stuff...
9
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script...
9
by: TD | last post by:
I am trying to add transactions to my code. The original code worked fine until I followed an example to setup transactions, now the code does strange things, but no error messages. Could...
3
by: cdj | last post by:
Hi all, I've got a picturebox on a form, and a save button. When I go to save, the app craps out with the following error: ================== An unhandled exception of type...
20
by: Peter E. Granger | last post by:
I'm having a strange problem (or at least it seems strange to me) trying to display a MessageBox in a VC++ .NET forms application. If I put the call to MessageBox::Show in the form's .h file, it...
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
2
by: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new...
1
by: Ward Bekker | last post by:
Hi, Because of a nasty exception (see below), in some non-managed/non .net com stuff that my application is talking to, my stack trace (also below) does not show something useful. I would...
3
by: Morten Snedker | last post by:
If I have a number of random applications open, move the mouse cursor to a given position and do a click, the application gets the focus. That is what this simple code should illustrate: Dim...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.