INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

DSN to DSNless leads to error

DSN to DSNless leads to error

(OP)
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

RE: DSN to DSNless leads to error

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

RE: DSN to DSNless leads to error

(OP)
ooops
the error is rather unhelpful and is simply

error '80004005'
/hidden23.asp, line 15

with no other information
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close