Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQL remote view
Message
 
 
To
30/10/2001 22:10:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00575449
Message ID:
00575559
Views:
24
This message has been marked as the solution to the initial question of the thread.
Hi Mike...

Creating RV's on the fly, especially in a shared DBC environment, is a pain.

In this case, all you want is a set of records returned. I don't know if you want to update these records, but for the moment, let's set that issue aside.

Instead, you will to issue a SQLExec() call against a connection you already have created. This is what a RV does. However, in this case, you won't have to go through the bother of trying to manage the creation of a RV.

You can test all of this from the command window:

nHandle = SQLConnect() && pick a DSN or use SQLStringConnect() and supply a string.

SQLExec(nHandle,"Select field1, field2 From foo","myresultset")

Here is the key part:

You will most likely have a grid that you will want to tie the cursor to.. It is very important that you first set the RecordSource Property of the grid to an empty string:

grid.RecordSource = ""

before setting the recordsource to "myresultset"

If you don't do this, all of the pre-formatted characteristics of the grid will be lost.

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform