I am using the dbexpasa.dll (7.1) to connect a Delphi 7 application to an ASA 9 network database. Unfortunately, there are multiple databases with the same service (HOST) and database name on the network. Although Sybase documentation seems to indicate that you can specify a physical server name or IP address in the LINKS parameter of the connection string, I have been unsuccessful at getting that to work. I have played around with the asasrv.ini file to control which physical server the connection hits, but that file seems to automatically be modified if that server is not available, so I never know for sure where the connection is going to go. Here is a connection string that works, but without specifying the physical server: HOSTNAME=<databaseservicename>,DATABASE=<databasename>,USER_NAME=<username>,PASSWORD=** I have tried to add LINKS=TCPIP(IP=10.10.xx.xx:2638) or LINKS=TCPIP(HOST=10.10.xx.xx:26338) to no avail. Is it possible to include the physical server name or is the only solution to rename the database services to be different?
As far as I can tell, HOSTNAME, DATABASE and USER_NAME are not the names of connection string parameters in SQL Anywhere 9... are they Delphi things, or just speling misteaks in your question?
The HOST keyword is an inner-level TCPIP protocol parameter, not an outer-level connection string parameter. HOST is the computer name or IP address... it is not the service name... I don't think the service name can be specified anywhere, but I may be wrong.
FWIW the asasrv.ini file is a cosmic-level annoyance, and has often been the cause of connections made to a server OTHER THAN the one specified in the connection string.
Here is an example of a connection string. In this case, the ddd.db database file has been started by dbsrv9.exe, causing both the runtime database name (DBN) and engine name (ENG) to default to "ddd". The HOST protocol option specifies the ip address for the computer running the database, plus the port :2638 being used , and the DOBROAD=NONE protocol option provides two benefits: It suppresses all the asasrv.ini foolishness, as well as all broadcasting to look for the database on other computers; in other words, if the HOST doesn't work the connection will fail, which is what you want (it's what EVERYBODY wants in my opinion):
Generally speaking, in a network environment with any level of sophistication whatsoever, DOBROAD=NONE is your friend.