Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database two executes

Status
Not open for further replies.

as1981

IS-IT--Management
Joined
Sep 28, 2006
Messages
394
Location
GB
All,

VM Pro 4.2

I'm trying to achieve the following:

1) Do a database select which returns several records
2) Use a column from the first select as the input for a second one.
3) When the second select is finished repeat the process with the next record from the first select

However I do this the second execute seems to overwrite the first so I can't use the next record from the first one.

Is it possible and if so how?

Thanks
 
Copy the first selected DB records to CP variables and do a second select using one of the CP varaibles, copy the results to CP variables etc.
there are 16 CP variables and 6 db variables so you can retrieve a max of 24 records in one call flow using this.
Another option is to create user variables and copy the retrieved records to user variables, in theory there is no limit on the number of records to retrieve.
 
Hello,

Thanks for the help. If I understand correctly that means putting each returned record from the first select into another CP variable?

In my example the first select returns two columns. That means I would need to do the following?:

Record 1, field 1 > CP0
Record 1, field 2 > CP1
Record 2, field 3 > CP2
Record 2, field 4 > CP3

Thanks

Andrew
 
Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top