Advantage .NET Data Provider connection strings

Sybase Advantage

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)