473,320 Members | 1,951 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,320 software developers and data experts.

Intermittant Server Error reading an MS Access DB

Hi all,

I am getting an intermittant error after uploading a project from my
development machine. I click on a link which opens an aspx page that, upon
page load, reads a very small amount of data from an MS Access database,
using ODBC and a stored query. There is no problem on my development
machine. On the production server though, I get the intermittant error shown
below. If I click back and forth between the problem page and the linking
page, the error only occurs every 6th (or so) times I click on the link.
When I do get the error, the page works fine if I page back and click again,
or if I just re-load the page (until it happens again later). I read the DB
in other parts of the project and have not seen the problem anywhere else
yet.

This is my first .NET project and so I may be missing something obvious. Can
anybody tell me where I should look for this problem or what might be
causing it? I don't really understand how to use the stack info provided. Is
it some type of timing or "database not ready" thing that I need to handle?
(I've read lots of DBs in regular ASP and have had no problem like this).
Should I be trying to Catch this error somewhere (where?).

TIA,
Chuck
Server Error in '/HistoricGrowth' Application.
----------------------------------------------------------------------------
----

ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Unknown name
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 [22018]
[Microsoft][ODBC Microsoft Access Driver] Unknown name

Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [22018] [Microsoft][ODBC Microsoft Access Driver]
Unknown name]
System.Data.Odbc.OdbcConnection.HandleError(Handle Ref hrHandle,
SQL_HANDLE hType, RETCODE retcode) +32
System.Data.Odbc.OdbcCommand.ExecuteReaderObject(C ommandBehavior
behavior, String method) +1189
System.Data.Odbc.OdbcCommand.ExecuteReader(Command Behavior behavior) +48

System.Data.Odbc.OdbcCommand.System.Data.IDbComman d.ExecuteReader(CommandBeh
avior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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, String srcTable)
+36
clsUtil_MyDB.MyDB.GetDataSet_ODBC(DataSet dsDataSet) +556
clsUtil_MyDB.MyDB.GetDataSet(DataSet dsDataSet) +22
HistoricGrowth.HistoricGrowth.InitializePageContro ls() +386
HistoricGrowth.HistoricGrowth.Page_Load(Object sender, EventArgs e) +51
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
Nov 18 '05 #1
2 2245
Hello again,

I narrowed down where the error occurs by writing to a trace file. Below is
my code that builds the data adapter and attempts to fill the dataset. When
the error occurs, it occurs the first time at the DATAADAPTER.FILL line in
the FOR NEXT loop. Again, the error occurs seemingly randomly. Anybody see
anything wrong that might cause the error to occur upon occasion and what I
should do to keep it from happening???

Thanks again,
Chuck

'===========================================
Private Sub GetDataSet_ODBC(ByVal dsDataSet As DataSet)

Dim DataAdapter As New System.Data.Odbc.OdbcDataAdapter
Dim i As Integer
Dim iUBound As Integer
DataAdapter.SelectCommand = New System.Data.Odbc.OdbcCommand

With DataAdapter.SelectCommand
.CommandType = CommandType.StoredProcedure
.Connection = New System.Data.Odbc.OdbcConnection
.Connection.ConnectionTimeout = 15
.Connection.ConnectionString = "Driver={Microsoft Access Driver
(*.mdb)};" & _
"DBQ=" & tDBPath & tDBName & ";UID=;PWD=" & tDBPassword
End With
DataAdapter.InsertCommand = New System.Data.Odbc.OdbcCommand
With DataAdapter.InsertCommand
.CommandType = CommandType.StoredProcedure
.Connection = DataAdapter.SelectCommand.Connection
End With
DataAdapter.SelectCommand.Connection.Open()
iUBound = UBound(usrProcedures)

For i = 0 To iUBound

DataAdapter.SelectCommand.CommandText = "Execute " &
usrProcedures(i).tName & " " & usrProcedures(i).tParameters

If Me.bWriteToTraceFile Then Me.WriteToTextFile(" Executing... " &
usrProcedures(i).tName, System.AppDomain.CurrentDomain.BaseDirectory &
"..\TraceFiles\TraceODBC.txt", True)

DataAdapter.Fill(dsDataSet, usrProcedures(i).tTableName)

If Me.bWriteToTraceFile Then Me.WriteToTextFile(" Wrote to " &
usrProcedures(i).tTableName, System.AppDomain.CurrentDomain.BaseDirectory &
"..\TraceFiles\TraceODBC.txt", True)

Next
DataAdapter.SelectCommand.Connection.Close()
DataAdapter = Nothing

End Sub
'===========================================
"Chuck Ritzke" <CHUCK AT MYACTUARY DOT COM> wrote in message
news:ei**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I am getting an intermittant error after uploading a project from my
development machine. I click on a link which opens an aspx page that, upon
page load, reads a very small amount of data from an MS Access database,
using ODBC and a stored query. There is no problem on my development
machine. On the production server though, I get the intermittant error shown below. If I click back and forth between the problem page and the linking
page, the error only occurs every 6th (or so) times I click on the link.
When I do get the error, the page works fine if I page back and click again, or if I just re-load the page (until it happens again later). I read the DB in other parts of the project and have not seen the problem anywhere else
yet.

This is my first .NET project and so I may be missing something obvious. Can anybody tell me where I should look for this problem or what might be
causing it? I don't really understand how to use the stack info provided. Is it some type of timing or "database not ready" thing that I need to handle? (I've read lots of DBs in regular ASP and have had no problem like this).
Should I be trying to Catch this error somewhere (where?).

TIA,
Chuck
Server Error in '/HistoricGrowth' Application.
-------------------------------------------------------------------------- -- ----

ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Unknown name
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 [22018]
[Microsoft][ODBC Microsoft Access Driver] Unknown name

Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [22018] [Microsoft][ODBC Microsoft Access Driver]
Unknown name]
System.Data.Odbc.OdbcConnection.HandleError(Handle Ref hrHandle,
SQL_HANDLE hType, RETCODE retcode) +32
System.Data.Odbc.OdbcCommand.ExecuteReaderObject(C ommandBehavior
behavior, String method) +1189
System.Data.Odbc.OdbcCommand.ExecuteReader(Command Behavior behavior) +48
System.Data.Odbc.OdbcCommand.System.Data.IDbComman d.ExecuteReader(CommandBeh avior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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, String srcTable)
+36
clsUtil_MyDB.MyDB.GetDataSet_ODBC(DataSet dsDataSet) +556
clsUtil_MyDB.MyDB.GetDataSet(DataSet dsDataSet) +22
HistoricGrowth.HistoricGrowth.InitializePageContro ls() +386
HistoricGrowth.HistoricGrowth.Page_Load(Object sender, EventArgs e) +51
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

Nov 18 '05 #2
I've found the problem (or at least testing has shown so thus far). My
procedure had arguments and I failed to put the arguments inside of single
quotes. Quoteless arguments in an MS Access stored query apparently work
inconsistently. Odd though that this causes no problems on my development
machine and just on the server.

Chuck

"Chuck Ritzke" <CHUCK AT MYACTUARY DOT COM> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hello again,

I narrowed down where the error occurs by writing to a trace file. Below is my code that builds the data adapter and attempts to fill the dataset. When the error occurs, it occurs the first time at the DATAADAPTER.FILL line in
the FOR NEXT loop. Again, the error occurs seemingly randomly. Anybody see
anything wrong that might cause the error to occur upon occasion and what I should do to keep it from happening???

Thanks again,
Chuck

'===========================================
Private Sub GetDataSet_ODBC(ByVal dsDataSet As DataSet)

Dim DataAdapter As New System.Data.Odbc.OdbcDataAdapter
Dim i As Integer
Dim iUBound As Integer
DataAdapter.SelectCommand = New System.Data.Odbc.OdbcCommand

With DataAdapter.SelectCommand
.CommandType = CommandType.StoredProcedure
.Connection = New System.Data.Odbc.OdbcConnection
.Connection.ConnectionTimeout = 15
.Connection.ConnectionString = "Driver={Microsoft Access Driver
(*.mdb)};" & _
"DBQ=" & tDBPath & tDBName & ";UID=;PWD=" & tDBPassword
End With
DataAdapter.InsertCommand = New System.Data.Odbc.OdbcCommand
With DataAdapter.InsertCommand
.CommandType = CommandType.StoredProcedure
.Connection = DataAdapter.SelectCommand.Connection
End With
DataAdapter.SelectCommand.Connection.Open()
iUBound = UBound(usrProcedures)

For i = 0 To iUBound

DataAdapter.SelectCommand.CommandText = "Execute " &
usrProcedures(i).tName & " " & usrProcedures(i).tParameters

If Me.bWriteToTraceFile Then Me.WriteToTextFile(" Executing... " &
usrProcedures(i).tName, System.AppDomain.CurrentDomain.BaseDirectory &
"..\TraceFiles\TraceODBC.txt", True)

DataAdapter.Fill(dsDataSet, usrProcedures(i).tTableName)

If Me.bWriteToTraceFile Then Me.WriteToTextFile(" Wrote to " &
usrProcedures(i).tTableName, System.AppDomain.CurrentDomain.BaseDirectory & "..\TraceFiles\TraceODBC.txt", True)

Next
DataAdapter.SelectCommand.Connection.Close()
DataAdapter = Nothing

End Sub
'===========================================
"Chuck Ritzke" <CHUCK AT MYACTUARY DOT COM> wrote in message
news:ei**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I am getting an intermittant error after uploading a project from my
development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of data from an MS Access database,
using ODBC and a stored query. There is no problem on my development
machine. On the production server though, I get the intermittant error shown
below. If I click back and forth between the problem page and the linking page, the error only occurs every 6th (or so) times I click on the link.
When I do get the error, the page works fine if I page back and click

again,
or if I just re-load the page (until it happens again later). I read the

DB
in other parts of the project and have not seen the problem anywhere else yet.

This is my first .NET project and so I may be missing something obvious.

Can
anybody tell me where I should look for this problem or what might be
causing it? I don't really understand how to use the stack info provided. Is
it some type of timing or "database not ready" thing that I need to

handle?
(I've read lots of DBs in regular ASP and have had no problem like

this). Should I be trying to Catch this error somewhere (where?).

TIA,
Chuck
Server Error in '/HistoricGrowth' Application.


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

ERROR [22018] [Microsoft][ODBC Microsoft Access Driver] Unknown name
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 [22018]
[Microsoft][ODBC Microsoft Access Driver] Unknown name

Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OdbcException: ERROR [22018] [Microsoft][ODBC Microsoft Access Driver]
Unknown name]
System.Data.Odbc.OdbcConnection.HandleError(Handle Ref hrHandle,
SQL_HANDLE hType, RETCODE retcode) +32
System.Data.Odbc.OdbcCommand.ExecuteReaderObject(C ommandBehavior
behavior, String method) +1189
System.Data.Odbc.OdbcCommand.ExecuteReader(Command Behavior behavior)

+48

System.Data.Odbc.OdbcCommand.System.Data.IDbComman d.ExecuteReader(CommandBeh
avior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(O bject 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, String srcTable) +36
clsUtil_MyDB.MyDB.GetDataSet_ODBC(DataSet dsDataSet) +556
clsUtil_MyDB.MyDB.GetDataSet(DataSet dsDataSet) +22
HistoricGrowth.HistoricGrowth.InitializePageContro ls() +386
HistoricGrowth.HistoricGrowth.Page_Load(Object sender, EventArgs e) +51 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


Nov 18 '05 #3

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

Similar topics

5
by: Michael Mossey | last post by:
Runnng python 2.2 on HP-UX, I get intermittant slow startup. Sometimes python starts up in a small fraction of a second, and sometimes takes 3-5 seconds. This applies to any script I run, or just...
0
by: Nick Jushchyshyn | last post by:
Having a really strange issue with IIS 6 where the session variable does not stay consistant. The first symptom was that database connections (which use a user entered name/PW stored in the...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
1
by: Sean C. | last post by:
Helpful folks, We have been having an intermittent and completely unreproducable problem concerning user authentication on Windows 2000: SQL1403N The username and/or password supplied is...
3
by: Michael | last post by:
I am using MS Access 2000 on an Windows XP machine and am trying to use the Upsizing Tool in Access 2000 to upsize an Access 2000 database to use with Microsoft SQL Server 7.0. My MS Access...
0
by: Mark Phanides | last post by:
My ASP.NET application intermittantly (but always at same point) redirects to the 'Invalid Syntax Error' web page for some unknown reason. I've created a ASP.NET application written in VB.NET with...
2
by: James Wallace | last post by:
I hope that someone can help me out there with this problem. I get an itermittant problem with our web page that occurs about once every 10 to 15 days where the only way to fix the problem is to...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
0
by: bob | last post by:
Hi, VS2005 Windows App. Datalayer talking to a local SQL Anywhere 9 Database using OleDb. App runs OK for about a week then crashes in the Datalayer. The crash occurs attempting to retrieve...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.