Database connection

Results 1 to 2 of 2

Thread: Database connection

  1. #1
    Join Date
    Dec 1969

    Default Database connection

    I am trying to connect to a database using the asp connect string using the following code.<BR><BR>Dim conn<BR><BR> set conn = server.createobject ("adodb.connection")<BR> conn.ConnectionString = "driver=SQL Server;" & _<BR> "DATABASE=Spam; UID=SPAMWeb;PWD=password;" & _<BR> "SERVER=localhost"<BR><BR><BR>I am able to connect to the database using a DSN connection. Does anyone see why this is not working<BR>cheers Mal

  2. #2
    Join Date
    Dec 1969

    Default RE: Database connection

    Here&#039;s a more versatile connection string...<BR><BR>conn.ConnectionString = "Provider=SQLOLEDB.1;" & _<BR>"PWD=password;UID=SPAMWeb;Initial Catalog=Spam;" & _<BR>"Data Source=(local)"<BR>

Posting Permissions

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