I have an SQL system with a "master" database used for system functions and mulitple "company" databases. The ODBC is defaulted to the "master" and the program targets the appropriate "company". I do not have access to the code that does this. I need to execute a stored procedure that increments the next customer number for the company. The code that I have works, but only if I manually set the default database to the appropriate "company" in the ODBC setup as the default database. To execute the sp I create a new connection (SQLCONNECT) and then make a call to the sp.
What code can I use to select the appropriate company database before calling the sp? i.e. What is the i-sql equivalent of "OPEN DATA dbname"?
TIA
Larry