Results 1 to 3 of 3

Thread: Still not working

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Alberton, Gauteng, South-Africa
    Posts
    48

    Angry

    hey there!

    Well I tried somethig else but Is till get errors .. here's my revised code:

    *********

    aConnect = "Provider=SQLOLEDB.1;Persist Security Info=False;Data Source=DEV-SVR;Initial Catalog=Alchemy;User ID=Guest;Password=;ConnectionTimeout=10;"

    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Mode = abModeReadWrite
    conn.ConnectionString = aConnect
    conn.Open "SELECT * from Users"

    'Set objRec = Server.CreateObject("ADODB.Connection")


    While not conn.EOF
    Response.Write conn("Users_UID") & " "
    Response.Write conn("Users_PWD") & " "
    conn.MoveNext
    Wend

    conn.Close

    *********

    An here's the new Erroe

    *********

    Microsoft OLE DB Provider for SQL Server (0x80004005)
    [DBNMPNTW]ConnectionOpen (CreateFile()).

    thanks for your help
    ;-)
    Jaco
    South-Africa

  2. #2
    Guest

    You need a recordset object

    Try this:

    Code:
    aConnect = "Provider=SQLOLEDB.1;Persist Security Info=False;Data Source=DEV-SVR;Initial Catalog=Alchemy;User ID=Guest;Password=;ConnectionTimeout=10;" 
    
    Set conn = Server.CreateObject("ADODB.Connection") 
    Set rsResults = Server.CreateObject ("ADODB.Recordset")
    conn.Mode = abModeReadWrite 
    conn.ConnectionString = aConnect 
    Set rsResults = conn.Execute( "SELECT * from Users")
    
    
    While not rsResults.EOF 
    Response.Write rsResults("Users_UID") & " " 
    Response.Write rsResults("Users_PWD") & " " 
    rsResults.MoveNext 
    Wend 
    
    conn.Close 
    rsResults.Close

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Alberton, Gauteng, South-Africa
    Posts
    48

    Cool Thanks Man

    Hey bubba

    Thanks for the help ... it worked like a dream .. is see my fault!!!

    Cheers!
    ;-)
    Jaco
    South-Africa

Posting Permissions

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



Click Here to Expand Forum to Full Width