General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only