SQL Server connection

Results 1 to 3 of 3

Thread: SQL Server connection

  1. #1
    Join Date
    Dec 1969

    Default SQL Server connection

    i try to connect to SQL Server:<BR>con1.Open "PROVIDER=MSDASQL;DRIVER={SQL Server};" & _<BR> "DSN=CEL;DATABASE=Test;" & _<BR> "UID=sa;PWD=;"<BR><BR>It says:<BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied<BR>What is wrong?

  2. #2
    . Guest

    Default RE: SQL Server connection

    Try This...it&#039;s a DSNless connection<BR>set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "Driver={SQL Server}; Server=ServerNameHere; Database=DatabaseNameHere; Uid=sa; Pwd=;"<BR>

  3. #3
    Join Date
    Dec 1969

    Default Thanks a lot , working

    Thank you

Posting Permissions

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