SQL Server DSN or Not DSN

Results 1 to 4 of 4

Thread: SQL Server DSN or Not DSN

  1. #1
    Jon Guest

    Default SQL Server DSN or Not DSN

    Hi Everyone,<BR> Does anyone know which is the best or most appropriate method of connecting to an SQL Server database, currently I have configured a DSN, to which my global.asa sets a Session connection sring. This works okay, but should I be doing it another way????

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Server DSN or Not DSN

    One thing is for sure, maintaining connection object in session is going to screwup the server resource<BR><BR>One certain better way of doing it is, create the connection object in an asp file and include in those pages which are being referenced and @ the end of the file set the object to nothing<BR>regards<BR>naVeen<BR>

  3. #3
    Jon Guest

    Default RE: SQL Server DSN or Not DSN

    Cheers naVeen, But I am not holding the entire connection object in Session, just the connection string, I always set data objects to nothing.<BR>I just wanted to know what the best connection method was either via a DSN or just by a DSN-less connection where you specify the server name in the connection String.<BR>

  4. #4
    chetan Guest

    Default RE: SQL Server DSN or Not DSN

    If it is a MSSQL server that you are using then I would recomend that you user the OLE DB provider for it instead of the system DSN option provided by ODBC. The connection string looks like this:-<BR><BR>"Provider=SQLOLEDB; Data Source=[sql_server]; Initial Catalog=[sql_database]; " _<BR> & "User Id=[username]; Password=[password];"<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