4Wheels
08-29-2011, 04:36 PM
Is it true that Access databases were not intended for use in web applications? I build a database driven site 6 years ago using Access and never had any problems. It's version 2002/2003 now but I can't get a connection to it no matter what.
Honestly I wasn't planning on investing this much time fixing old databases, ASP code and HTML. I just wanted to get my old site back up since people have been wanting me to, and then focus on another project I already started using SQL Server and ASP.NET 4.0.
Ideas? Should I abandon my old site?
Or one last time, does anyone see anything wrong with this code? If I can't resolve this after one day I give up...time to move on.
Thanks a lot...to anyone who can see what I can't. ;)
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
set rsIntro = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT count(*) as plantcnt FROM intro " & _
"WHERE ready=true and Instr(common_name, '1')=0 and group_nbr<17 "
' response.write "<br>filepath:" & filepath & "*"
' response.write "<br>common_name:" & common_name & "*"
' response.write "<br>group_nbr:" & group_nbr & "*"
' response.write "<br>strSQL:" & strSQL & "*"
' response.flush
' response.end
rsIntro.Open strSQL, objConn <-------- error
if not rsIntro.EOF then
dim intTotPlants
intTotPlants=rsIntro("plantcnt")
end if
rsIntro.Close
strSQL = "SELECT count(*) as tipscnt FROM intro WHERE ready=true and Instr(common_name, '1')=1 or group_nbr>16"
rsIntro.Open strSQL, objConn
if not rsIntro.EOF then
dim int
intTotTips=rsIntro("tipscnt")
end if
set rsIntro = nothing
set objConn = nothing
========================
If I uncomment the 6 lines above, this is the output: (common_name and group_nbr are both null even though I see data there.
Sorry but I can't get this code to format very well. [code] and [\code] don't seem to work.
========================
filepath:E:\web\jaysplantsc\htdocs\db\plants.mdb*
common_name:*
group_nbr:*
strSQL:SELECT count(*) as plantcnt FROM intro WHERE ready=true and Instr(common_name, '1')=0 and group_nbr<17 *
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/index.asp, line 43
Honestly I wasn't planning on investing this much time fixing old databases, ASP code and HTML. I just wanted to get my old site back up since people have been wanting me to, and then focus on another project I already started using SQL Server and ASP.NET 4.0.
Ideas? Should I abandon my old site?
Or one last time, does anyone see anything wrong with this code? If I can't resolve this after one day I give up...time to move on.
Thanks a lot...to anyone who can see what I can't. ;)
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
set rsIntro = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT count(*) as plantcnt FROM intro " & _
"WHERE ready=true and Instr(common_name, '1')=0 and group_nbr<17 "
' response.write "<br>filepath:" & filepath & "*"
' response.write "<br>common_name:" & common_name & "*"
' response.write "<br>group_nbr:" & group_nbr & "*"
' response.write "<br>strSQL:" & strSQL & "*"
' response.flush
' response.end
rsIntro.Open strSQL, objConn <-------- error
if not rsIntro.EOF then
dim intTotPlants
intTotPlants=rsIntro("plantcnt")
end if
rsIntro.Close
strSQL = "SELECT count(*) as tipscnt FROM intro WHERE ready=true and Instr(common_name, '1')=1 or group_nbr>16"
rsIntro.Open strSQL, objConn
if not rsIntro.EOF then
dim int
intTotTips=rsIntro("tipscnt")
end if
set rsIntro = nothing
set objConn = nothing
========================
If I uncomment the 6 lines above, this is the output: (common_name and group_nbr are both null even though I see data there.
Sorry but I can't get this code to format very well. [code] and [\code] don't seem to work.
========================
filepath:E:\web\jaysplantsc\htdocs\db\plants.mdb*
common_name:*
group_nbr:*
strSQL:SELECT count(*) as plantcnt FROM intro WHERE ready=true and Instr(common_name, '1')=0 and group_nbr<17 *
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/index.asp, line 43