Hello:
I have a problem (polite way of saying 'I have no idea') when using transactions. I have read in some other threads, and in Microsoft's knowledge database, that it is not possible to use transactions with the docmd.runSQL object. So I am trying to figure out how to work with QueryDefs.
I actually need to make some changes accepted or not in case all the records are within the especifications I set up for them.
The database is working this way. For example, I have 'n' invoices with products. The program then should take all the products in the invoice I choose and substract them from the table warehouse (if there is enough cuantity of them, in the first place). So I use a recordset to get the products in the given invoice. With this recordset I upgrade the information in the warehouse and at the same time I must insert the information of those products in another table for further use.
I am trying to use transactions with QueryDef but I don't know how to do it right (The only way I have founded is with CreateQueryDef, but I don't want to create the queries as I have to use this function more than once on each session).
Thanks in advance!
Igor M.
imorillo@zuhar.com
I have a problem (polite way of saying 'I have no idea') when using transactions. I have read in some other threads, and in Microsoft's knowledge database, that it is not possible to use transactions with the docmd.runSQL object. So I am trying to figure out how to work with QueryDefs.
I actually need to make some changes accepted or not in case all the records are within the especifications I set up for them.
The database is working this way. For example, I have 'n' invoices with products. The program then should take all the products in the invoice I choose and substract them from the table warehouse (if there is enough cuantity of them, in the first place). So I use a recordset to get the products in the given invoice. With this recordset I upgrade the information in the warehouse and at the same time I must insert the information of those products in another table for further use.
I am trying to use transactions with QueryDef but I don't know how to do it right (The only way I have founded is with CreateQueryDef, but I don't want to create the queries as I have to use this function more than once on each session).
Thanks in advance!
Igor M.
imorillo@zuhar.com