Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSN to DSNless leads to error

Status
Not open for further replies.

ianjenn

Programmer
Sep 25, 2001
14
0
0
GB
Hi
I am trying to move from a DSN connection string to a DSNless connection and for some reason I get an error when I try to do it.
My DSN connection was this
Dim objpharws50
Set objpharws50 = Server.CreateObject("ADODB.Connection")
objpharws50.Open "DSN=prescript"

and I have changed to this

strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath(".\electronic.mdb") & ";"
Set objpharws50 = Server.CreateObject("ADODB.Connection")
objpharws50.Open strConnection

The part of my code that I now get an error on is this line
rscheckpass.open strSQL, objpharws50, 3,3
in the code below????

Set rscheckpass = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT names.password, names.surname, names.ward" & _
" From names" & _
" WHERE names.password= '" & session("password") & "' AND names.surname= '" & session("surname") & "';"
rscheckpass.open strSQL, objpharws50, 3,3
If rscheckpass.eof then
response.redirect"error.asp"
else
Do while Not rscheckpass.eof
Session("ward") = rscheckpass("ward")
rscheckpass.movenext
loop
end if
rscheckpass.close
set rscheckpass = nothing
 
And the error is????

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
ooops
the error is rather unhelpful and is simply

error '80004005'
/hidden23.asp, line 15

with no other information
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top