DSN-less connection for SQL DB

Results 1 to 3 of 3

Thread: DSN-less connection for SQL DB

  1. #1
    Join Date
    Dec 1969

    Default DSN-less connection for SQL DB

    Can someone give me the syntax for making a DSN-less connection to a SQL database (with username and password). I&#039;d greatly appreciate it. Thank you... :-)<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: DSN-less connection for SQL DB


  3. #3
    jwalker Guest

    Default RE: DSN-less connection for SQL DB

    What I like to use is this.<BR><BR>In my asp file, I will make and include file that has the connection string in it. Place that file in a folder in the web application directory that way all other asp files that refrence that data connection can use the same string, and if it changes, you know.<BR><BR>The string I use is:<BR><BR>Set dbConn = Server.CreateObject("ADODB.Connection")<BR>&#060;!--#Include virtual="/warranty/connections/UCHelpDesk.asp"--&#062;<BR>Set rsRecords = Server.CreateObject("ADODB.Recordset")<BR><BR>and the include file has the below in it.<BR>dbConn.Open "DRIVER=SQL Server;SERVER=(local);UID=sa;PWD=;APP=Microsoft Open Database Connectivity;WSID=ServerName;DATABASE=NCSUC;QueryL og_On=Yes;StatsLog_On=Yes"<BR><BR>Happy Programing

Posting Permissions

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