Advantage .NET Data Provider connection strings

Connects to

Sybase Advantage

  • Standard remote connection

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;

    The value 2 can also be used instead of REMOTE

  • Local connection

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=LOCAL;

    The value 1 can also be used instead of REMOTE

  • AIS connection

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=AIS;

    The value 4 can also be used instead of REMOTE

    Note that ServerType values can be summed, for instance a value of 3 would mean the combination of LOCAL | REMOTE. The value can also be set to the full string, for instance, LOCAL|REMOTE instead of a numeric 3.

  • Separating the path and catalog parameters

    Data Source=\\myserver\myvolume\mypat;Initial Catalog=mydd.add;
    User ID
    =myUsername;Password=myPassword;ServerType=REMOTE;
  • Specifying port

    Data Source=\\myserver:9999\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;
  • Read only connection

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;ReadOnly=TRUE;
  • Trim spaces from string data

    Fields of type String will have trailing white spaced trimmed on retrieval.

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;TrimTrailingSpaces=TRUE;

    If FALSE is specified, then trailing white space is maintained on the values when they are retrieved. This means that a fixed length String field with a width of 10, for example, will always return 10 characters when the value is retrieved; it is padded with as many spaces as necessary.

  • Network protocol

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;CommType=UDP_IP;

    Valid CommType values are; TCP_IP, UDP_IP and IPX

  • Compression

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;Compression=ALWAYS;

    If ServerType is set to LOCAL, the Compression property is ignored.

    Valid values are ALWAYS, INTERNET, NEVER

    Bear in mind that if compression is turned off on the server no compression will take place no matter this client setting.

  • User count per connection disregarding client computer

    Default behaviour for counting number of users on the server is per computer connecting. This connection string overrides that behaviour making each connection count as a user even if made from the same computer.

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;IncrementUserCount=True;

    Default value for IncrementUserCount is False

  • Share DBF tables to other applications

    This is used to share DBF tables in a writable mode with other (non-Advantage) database applications.

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;LockMode=COMPATIBLE;

    Applicable to CDX and NTX TableTypes

    Default value (that will lock tables) is PROPRIETARY

  • Show deleted records

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;ShowDeleted=True;

    Applicable to CDX and NTX TableTypes

  • Dont increment user count for stored procedure

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;StoredProcedureConnection=True;

    Default value is false, meaning that the stored procedure will increment the server user count, preventing connections when user count reaches its maximum.

  • Disable connection pooling

    Data Source=\\myserver\myvolume\mypat\mydd.add;User ID=myUsername;
    Password
    =myPassword;ServerType=REMOTE;Pooling=False;

    Default values for pooling is true, with the options Min Pool Size=0, Max Pool Size=100, Connection Lifetime=0 (in seconds, 0 meaning it will never recycle)

Problems connecting?
Get answer in the Sybase Advantage Q & A forum
.NET Framework Class LibraryAdvantage.Data.Provider.AdsConnectionInfo and class library downloads

Articlesread all »

Providers

Connect

Articlesread all »

Didn't find your connection string?

Start over from the connection string reference index - or try a search!

In the Q&A forums you can ask your own question and let somebody help you.

The knowledge articles contains solutions and guides.