Results 1 to 6 of 6

Thread: Best SQL Server 7 connection string ?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sussex, England
    Posts
    45
    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]

  2. #2
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810

    Question

    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.
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sussex, England
    Posts
    45
    Thanks Jerry, looks good to me ...

    Ian.
    Ian Clarke BSc (Hons) - Web Applications Programmer
    Ricardo Consulting Engineers Ltd.
    Email : [email protected]

  4. #4
    Guest
    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.

  5. #5
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  6. #6
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    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


    Things I do when I am bored: DotNetable

Posting Permissions

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



Click Here to Expand Forum to Full Width