>>Two ways - one is DATABASE=UP241 (or whatever the DB name is). The other way is DATABASE=MASTER, and then issue the USE YOURDB as the first command after connection, and check the result.
>
>Even by doing this, it doesn't work.
>
>
>lcSQLString=[DRIVER=SQL Server;SERVER=.\SQLEXPRESS;Database=Master;Trusted_Connection=True;]
>lnSQLHandle=SQLSTRINGCONNECT(lcSQLString)
>? SQLEXEC(lnSQLHandle,'USE Test')
>
>
>lnSQLHandle has a value. But, executing SQLExec() on it, generates a -1.
Did you try the "server=(local)"?