The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
How to pass a recordset as a global variable
Posted: 05 Feb 10 2:11 PM
|
Is there any way of passing a recordset as a global variable? I would like to be able to query the database based off values on one tab and pass the resulting recordset to another screen via a global variable. |
|
|
| |
|
Re: How to pass a recordset as a global variable
Posted: 05 Feb 10 3:08 PM
|
Thats how I initially had it set up, this is the code I used:
Application.BasicFunctions.GlobalInfoset "grsAcctProd", rsAcctProd
On the screen I am trying to pass the recordset to I have:
Application.BasicFunctions.GlobalInfoFor("grsAcctProd")
I receive a "Type Mismatch error on the screen I am trying to pass the recordset to so I thought I was overlooking something. Now I am trying to figure out why I receive the error. |
|
|
|
Re: How to pass a recordset as a global variable
Posted: 07 Feb 10 10:19 PM
|
Everyone says you can, I never had any luck doing it.
It was far easier to pass an array of data back and forth.....
Application.Globalinfo.Add didn't work....probably because there is no SET object instanciation.....
There isn't any class serialization/GUID's so we couldn't pass a class object between forms either.... |
|
|
|
Re: How to pass a recordset as a global variable
Posted: 12 Feb 10 7:59 AM
|
sorry, its been a few years and I'm not setup with a LAN install handy. There is a trick to this and its on the initial setting of the global. 1) there are 2 sets of global functions, one works one doesn't (if i recall correctly) And Yes you need to use a set cmd. 2) might try; Dim r r = "recordset string" application.basicfunctions.globalInfoSet("gRecordset", x) set r = allpication.GetNewConnection.Execute(select ...) 'Now test what Global value is ? 3) Anoter options I sometimes need to do (and it works) is to set the variable in a Legacy Script Once done its still valid So VBScript set parameters as global Invoke "Basic", "Utility:Script" '''calls the Sub main(), it processes the step Read back global |
|
|
|