MSSQL Connection String Example

Discussion in 'Database Support' started by MaxPower, Feb 15, 2009.

  1. MaxPower

    MaxPower Perch

    I'm trying to connect to a MSSQL database on another server (host) so I have to use a connection string. Below is what I'm trying to use. Is this format correct?

    ConnectionString = "DRIVER=SQL Server;SERVER=ipaddress;UID=userid;PWD=password;APP=;DATABASE=database"

    Of course, the ipaddress, userid, password and database are replaced with my actual information.

    I get the following error:

    ADODB.Command error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    Thanks, Gary
  2. Stephen

    Stephen US Operations Staff Member

    what is AP P= there?

    check out for some examples too.
  3. MaxPower

    MaxPower Perch

    A space was added when the text was pasted. It is actually: APP=; and I have no idea what it means. Deleting it didn't help.
  4. MaxPower

    MaxPower Perch

    I've tried several strings from but I'm just taking shots in the dark. I'll contact tech support.
  5. MaxPower

    MaxPower Perch

    I was using Dreamweaver to create the connection code and it must have caused a syntax problem. I entered the code on the page myself and it now appears to work. Here's the connection string I eventually used:

    dbConn_Settings = "Driver=SQL Server;Server=ipaddress;Port=1433;Database=dbname;UID=username;PWD=password;"
  6. I had issues with above when connecting via dreamweaver for local binding etc. I found the solution that worked to enable local table view and binding at
    Check out connection via IP. However their string hasn't got Provider=SQLOLEDB.1; at the beginning of the syntax, which I needed to make connection.
    Then When uploading to production, I ammended the str to use db server nameservers. Hope that helps if youre having grief.
    jetx86 likes this.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services