SQL DSNLESS Connection

Results 1 to 3 of 3

Thread: SQL DSNLESS Connection

  1. #1
    Ben Barnes Guest

    Default SQL DSNLESS Connection

    Hi,<BR><BR>I am connecting to a MSSQL db using a DSNless connection. I normally use a DSn but I need to use a DSNless this time. I can connect to the db using the following code i have found however i am having no end of trouble getting information from the database. I basically need to see some code that has used a dsnless connection, executed a SQL statement and then put that onto a page. <BR><BR>This is the code I have managed to get connected to the db with.<BR><BR>&#060;%<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>DSNtemp ="DRIVER={SQL Server};SERVER=ServerName;UID=USER;PWD=password;DA TABASE=databasename"<BR>conn.open DSNtemp<BR>%&#062;<BR><BR>Please if anyone has any assistance it woudl be greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default You do realize....That ...

    DSN = DSN-Less? Anything that follows, is *exactly* the same.<BR>The only difference, is that a DSN has to look up the info from a DSN-Less in the registry. <BR>Nothing else changes. So if you&#039;re connecting to the database, any code that worked with a DSN, will work with a DSN-Less.

  3. #3
    Join Date
    Dec 1969

    Default The coneection looks good to me at least..<eo


Posting Permissions

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