Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > trouble with web forms

Reply
Thread Tools

trouble with web forms

 
 
somersbar@yahoo.com
Guest
Posts: n/a
 
      02-16-2006
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?

 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      02-17-2006
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
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?
>



 
Reply With Quote
 
 
 
 
Christopher Reed
Guest
Posts: n/a
 
      02-17-2006
Do you have Office installed on your server?
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
How to determine if context is Windows Forms or Web Forms Arsen V. ASP .Net 7 08-06-2005 09:24 AM
embedded windows forms into web forms for control =?Utf-8?B?ZGF2aWQ=?= ASP .Net 2 04-10-2005 01:07 PM
Web Forms VS Windows Forms Brendan Miller ASP .Net 2 08-11-2003 09:05 PM
trouble with caching or caching the trouble Hypo ASP .Net 6 08-01-2003 07:11 AM



Advertisments