D
Dave
I am getting the error above intermittantly with an ASP 3.0 page using an MS
Access 2003 database.
I have searched Google extensively and found the following possible causes
for this error:
A field name was spelled incorrectly.
One or more of the values was blank.
You tried to insert the wrong datatype (e.g. surrounded a numeric value with
quotes, or forgot to put quotes around a string).
Capitalization /spelling
However, none of these seem to be the cause of my problem.
As you can see below, I am not passing parameters, my data access statement
is an unqualified SELECT
I have written out the connection string and sql to the page and they appear
fine.
Attached is a summary of my code. Does anyone have any idea why this is
intermittantly occurring?
In global.asa:
Sub Application_onStart()
Application.Lock
sCn_App= "PROVIDER=MICROSOFT.JET.OLEDB.4.0; " & _
"DATA SOURCE=e:\inetpub\clients\frickcpa.com\fpdb\tvom.mdb"
Application.Contents.Item("cn_App")=sCn_App
Application.UnLock
End Sub
In ASP page:
<%
Dim sql,rs
Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Application("cn_App")
sql="SELECT questionid, question, Hint_Image FROM question"
Set rs = Server.CreateObject("ADODB.recordset")
With rs
.ActiveConnection=cn
.source=sql
.Open <---Error here at line 132
End With
Do while not rs.eof
.....
rs.movenext
Loop
If rs.State Then
rs.close
set rs=nothing
End if
If cn.State Then
cn.Close
End If
%>
Access 2003 database.
I have searched Google extensively and found the following possible causes
for this error:
A field name was spelled incorrectly.
One or more of the values was blank.
You tried to insert the wrong datatype (e.g. surrounded a numeric value with
quotes, or forgot to put quotes around a string).
Capitalization /spelling
However, none of these seem to be the cause of my problem.
As you can see below, I am not passing parameters, my data access statement
is an unqualified SELECT
I have written out the connection string and sql to the page and they appear
fine.
Attached is a summary of my code. Does anyone have any idea why this is
intermittantly occurring?
In global.asa:
Sub Application_onStart()
Application.Lock
sCn_App= "PROVIDER=MICROSOFT.JET.OLEDB.4.0; " & _
"DATA SOURCE=e:\inetpub\clients\frickcpa.com\fpdb\tvom.mdb"
Application.Contents.Item("cn_App")=sCn_App
Application.UnLock
End Sub
In ASP page:
<%
Dim sql,rs
Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Application("cn_App")
sql="SELECT questionid, question, Hint_Image FROM question"
Set rs = Server.CreateObject("ADODB.recordset")
With rs
.ActiveConnection=cn
.source=sql
.Open <---Error here at line 132
End With
Do while not rs.eof
.....
rs.movenext
Loop
If rs.State Then
rs.close
set rs=nothing
End if
If cn.State Then
cn.Close
End If
%>