Hello,
I have a query that get results from my database.
Database 1
+------------------------------------+
| ID | OrderId | Name | AMOUT | Type |
+------------------------------------+
I have another database with the total items in stock
Database 2
+---------------------------+
| ID | Name | STOCK | price |
+---------------------------+
What I do is select all the records from database1 where OrderId = 1
The results are stored in l_rsTmp
I found some code on the web:
That should walk through the results. How can I get the ID and the AMOUNT from one row? This information should be used in the second query to decrease the STOCK value for the correct ID.
Suggestions are very welcome!![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)
I have a query that get results from my database.
Database 1
+------------------------------------+
| ID | OrderId | Name | AMOUT | Type |
+------------------------------------+
I have another database with the total items in stock
Database 2
+---------------------------+
| ID | Name | STOCK | price |
+---------------------------+
What I do is select all the records from database1 where OrderId = 1
The results are stored in l_rsTmp
I found some code on the web:
Code:
For i = 1 To l_rsTmp.Fields.Count
MsgBox (l_rsTmp.Fields(i - 1).)
Next
Suggestions are very welcome!
![[noevil] [noevil] [noevil]](/data/assets/smilies/noevil.gif)