Joe is correct.
You need to query the db from the main app side and create some
mechanism for querying the results from the recordset by special
methods in your context object.
The simplist method is to have the rbscipt call out a SQL string that
returns a single row, single column result and passes it back to the
rbscript _as a string_
The rbscrip then has to deal with all the ramifications.
Alterntantives could be storing the record set in a dictionary (n the
main app side), then the rbscript can ask for various info , via
context methods and when the record set is fully read, the rb script
calls another method in the context to close the record set -
otherwise you leak objects.
It's best to think of RBscript as a separate applications that you
want to talk to and then to imagine clever ways to send strings
between these two running apps.
On Jan 19, 2007, at 15:48 UTC, Rafael Vallejo GMAIL wrote:
Hello list, how do I create and asign the result of a query into a
Recordset inside RBScript, classes for dealing with databases has
been created and works with no problem but recordsets seems to be a
challange I can not create a recordset using SQLSelect SQLExecute
works fine.
I'm not clear on exactly what you're trying to do. Of course you can't
create a RecordSet inside RBScript; that's not part of the runtime that
RBScript supports. (Indeed, RBScript deals only with base types like
strings and numbers.) You can call a method on the context object,
that may do something internally with a RecordSet, but it can't return
this to the script itself, since, again, RBScript knows nothing about
the framework classes.
Best,
- Joe
--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC "Making the Internet a Better Place"
http://www.verex.com/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
Cheers,
Dr Gerard Hammond
MacSOS Solutions
http://www.macsos.com.au
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>