|
-
Feb 6th, 2001, 05:33 AM
#1
Thread Starter
Member
Can someone recommend the best connection sring to use when setting up a (read and write) connection to a SQL Server 7 database via ASP.
Cheers
Ian.
Ian Clarke BSc (Hons) - Web Applications Programmer
Ricardo Consulting Engineers Ltd.
Email : [email protected]
-
Feb 6th, 2001, 06:43 AM
#2
Fanatic Member
I use the following:
Code:
DB_CONNECTIONSTRING = "Driver={SQL Server};Server=TB2K;Uid=KeyfaxUser;Pwd=******;Database=Keyfax;"
Whether or not it's the BEST way is open to speculation. I too would like to see other answers.
-
Feb 6th, 2001, 06:47 AM
#3
Thread Starter
Member
Thanks Jerry, looks good to me ...
Ian.
Ian Clarke BSc (Hons) - Web Applications Programmer
Ricardo Consulting Engineers Ltd.
Email : [email protected]
-
Feb 6th, 2001, 06:47 AM
#4
That's what I use. 
You can usually get away with leaving out the DATABASE argument if you are using the default database for that user.
You can also omit the UID/USER and PWS/PASS arguments if you give the web server user (IUSR_TB2K in Jerry's case) permissions to use the necessary db.
-
Feb 6th, 2001, 07:35 PM
#5
Guru
The most efficient method is to use the native OLEDB provider
Provider=SQLOLEDB;Data Source=Server;Uid=KeyfaxUser;Pwd=******;Database=Keyfax;
If you use Driver={SQL Server}, then OLEDB must go through ODBC, which adds another layer for commands and data to pass through. The system must also look for that driver in the file system and parse it (in the case of File DSNs)
More layers = less speed
-
Feb 12th, 2001, 06:37 AM
#6
Fanatic Member
If you are using SQLOLEDB as the provider then the parameters must be "User ID" and "Password".
The "UID" and "PWD" parameters are for use with the ODBC provider.
This came from article Q247931 of microsoft knowledge base
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|