Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConnect Issues
Message
 
 
To
10/03/2003 08:24:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00763562
Message ID:
00763588
Views:
12
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') && Database pubs
>SQLExec(lnHandle,'select * from authors')
>
Cetin
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform