Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConnect Issues
Message
From
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:
00763570
Views:
18
>I connect to an sql server and my application needs at least three databases.
>Is it possible to have three running connections at one time or do I have to make a connection to each database everytime my application needs a particular database?
>
>
>Junjun

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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform