Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQLSTRINGCONNECT and Remote Views
Message
 
To
09/03/2001 07:22:27
Dave Nantais
Light speed database solutions
Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00483453
Message ID:
00483621
Views:
7
To use remote views you need to have a connection defined in your DBC. However, this connection can be a DSN-less connection (passing the same string that you pass to SQLSTRINGCONNECT) and thus you won't have to deal with the ODBC settings on each connection.

To do it you will need to:

1. Define a DSN-less connection to your Access database. Below is a sample to connecto to SQL Server Northwind database.
OPEN DATA YourDBC
CREATE CONNECTION MyConnection ;
   CONNSTRING 'DRIVER=sql server;SERVER=(local);UID=sa;PWD=;DATABASE=northwind'
2. Create your remote view to use this connection.
CREATE SQL VIEW MyView REMOTE CONNECTION MyConnection SHARE AS ;
    select EmployeeID, LastName, FirstName from employees
3. Use your remote view as a regular VFP table.
OPEN DATA YourDBC
USE MyView
BROWSE
>I can connect to an Access97 database via the SQLSTRINGCONNECT command.
>
>Can I somehow use remote views to retrieve and update the Access97 database?
>
>Right now I am using SQLEXEC commands .... they become quite cumbersome.
>
>I would like the convenience of using Remote Views WITHOUT the overhead administration of setting up ODBC Connections at each user's Windows workstation.
>
>Dave.
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform