I have an ODBC connection and dataset that works fine.
I can create a popup and it returns the proper information.
I would like to put the data returned from the dataset into
a variable in an SSP. I've been looking at the "DS…."
functions but need some basic help.
In Basic+, how to I "lunch" the dataset, passing it a parameter
for the select "KEY". What function do I need to use to
return the dataset data returned in a variable or multiple variables
for each column in the dataset.
TIA
Steve C.
Sorry, no I don't want to take it out to lunch.
i want to "Launch" the dataset.
Steve C.
Hi Steve,
I have an ODBC connection and dataset that works fine. I can create a popup and it returns the proper information. I would like to put the data returned from the dataset into a variable in an SSP. I've been looking at the "DS…." functions but need some basic help. In Basic+, how to I "lunch" the dataset, passing it a parameter for the select "KEY". What function do I need to use to return the dataset data returned in a variable or multiple variables for each column in the dataset.
First instantiate the Connection Object:
Name=MY_CON"
hXO=XOInstance(Name)
Next instantiate the DataSet Object:
Name=MY_DSO"
hDS=DSInstance(Name, hXO)
Next execute the DataSet:
DSMethod(hDS, DS_EXECUTE$)
Next get the data (I copied this code from CS_SPY):
DSGetProperty(hDS, DS_RECORD$, List)
Lastly, clean up:
DSMethod(hDS, DS_DESTROY$)
XOMethod(hXO, XO_DESTROY$)
Suggestion: Check out the source we publish. The Client/Server spy (which would help you immensely to use it) is CS_SPY and the Client/Server Query Window is XO_QUERY.
Also, for directly executing SQL statements via ODBC etc. see the help for QryMethod … there is a complete code snippet there.
Happy hunting,
Cameron Purdy
Revelation Software
What was that Saturday morning show years back where Gilligan and this other guy were loading up food on a space ship and he hit the launch instead of the lunch button and they ended up rocketing through space having all sorts of wacky, comical and hillarious adventures?