connection error?????

Results 1 to 3 of 3

Thread: connection error?????

  1. #1
    Join Date
    Dec 1969

    Default connection error?????

    &#060;%<BR>dim objRec, rs, numberOfSeconds<BR><BR>numberOfSeconds = DateDiff( "s", CDate("1/1/1980"), Now )<BR><BR>Set objRec= Server.CreateObject("ADODB.Recordset")<BR> objRec.ConnectionString = "DSN=auditionamerica;DRIVER={SQL Server};UID=sa"<BR> objRec.ConnectionTimeout = 300<BR> objRec.Open<BR><BR>Set rs = Server.CreateObject ("ADODB.Recordset")<BR><BR>rs.Open "users", objRec, 1, 3, &H0002<BR> rs.AddNew<BR> rs("id_no") = numberOfSeconds<BR> rs("Username") = Request.Form("Username")<BR> rs("Password") = Request.Form("Password")<BR> rs.update<BR>rs.Close<BR>Set objRec = Nothing<BR><BR>Response.Redirect "auditioneejoin.asp"<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: connection error?????

    Your "objRec" should not be a recordset. It should be a connection object:<BR><BR>==== START<BR>Set objRec = Server.CreateObject("ADODB.Connection")<BR>==== END<BR><BR>That should help.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default Another point....

    If you are using a DSN (Which it appears you are...Trying, at least) You don&#039;t need to specify the Driver in the connection string.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts