Clarification. There's always current database for any connection. If one is not specified in connection string than default DB for the user that made connection is used. The technique below can be used with any type of ODBC connection to Sql Server, DSN or DSN-less.
>
>You could use SQLStringConnect and define no database. You could directly refer to a table with Database.Owner.TableName or switch database with use command. ie:
>
>
>lnHandle = SQLStringConnect('Driver=SQL server;Server=servername;'+;
> 'Integrated Security=SSPI;')
>SQLExec(lnHandle,'select * from Northwind.dbo.employees')
>SQLExec(lnHandle,'use Pubs')
>SQLExec(lnHandle,'select * from authors')
>
Cetin
--sb--