Sybase Advantage connection strings

Advantage .NET Data Provider

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.

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)

Advantage OLE DB Provider

Remote Server

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;Advantage Server Type=ADS_REMOTE_SERVER;

The value "Advantage.OLEDB.1" is also applicable for the provider key, the result will be the same.

Local Server

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;Advantage Server Type=ADS_LOCAL_SERVER;

Using FoxPro tables

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;TableType=ADS_CDX;Advantage Server Type=ADS_LOCAL_SERVER;

If not specifying the TableType value the default value of "ADS_ADT" will be used.

Show deleted records

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;TableType=ADS_CDX;ShowDeleted=TRUE;Advantage Server Type=ADS_LOCAL_SERVER;

Please note that the ShowDeleted option is only available with FoxPro tables, ie TableType="ADS_CDX".

Using OEM characters in tables

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;Advantage Server Type=ADS_REMOTE_SERVER;CharType=ADS_OEM;

If not specifying the CharType value the default value of "ADS_ANSI" will be used.

Ignoring rights

Provider=Advantage OLE DB Provider;User ID=adssys;Data Source=MyDataDictionaryPath;Advantage Server Type=ADS_REMOTE_SERVER;SecurityMode=ADS_IGNORERIGHTS;

If not specifying the SecurityMode value the default value of "ADS_CHECKRIGHTS" will be used.

Advantage ODBC Driver

Specifying table cache

DataDirectory=\\servername\sharename\dictionaryfile.add;ServerTypes=2;MaxTableCloseCache=20;

The number of tables to hold in cache when cursors are opened and closed. Default value is 25.

Use compression

DataDirectory=\\servername\sharename\dictionaryfile.add;ServerTypes=2;Compression=Always;

Possible values are ALWAYS, INTERNET, NEVER or empty string. If left empty the ADS.INI file will control the setting. This parameter is not used with ALS.