markpremier
Programmer
I've built a shopping cart object in vbscript/asp that stores all relevant item selection and identification data in a progress table.
Once someone selects an item to place in the cart, the form shoots them over to an intermediary page which adds the item to the cart and then returns them to the page they were on.
Here's the problem. I can't seem to commit the transaction via an Execute method using the current connection object. It raises a SQL syntax error every time. The insert appears in the database as verified by SQL Explorer, and by attempting a second insert of the same PK tuple <Session id, item number> raising a key violation error.
Given enough time, but not as long as a session timeout, the transaction posts and the shopping cart works as it should. But it seems bad form to force a coffee break everytime someone adds an item to the cart.
Also troubling is that update queries work instantaneously. I suspect it may be a dirty read.
Long story short, is there a way to commit a transaction on Progress from a VBScript/ASP page?
Things I've tried, and have failed:
connObj.Execute "INSERT INTO table(...) VALUES(...)"
(insert works, but takes maybe 5 minutes to commit)
connObj.Execute "INSERT INTO table(...) VALUES(...)"
connObj.Execute "COMMIT Work" | "Exec SQL COMMIT WORK" | "COMMIT"
(barfs raising Syntax error (7587))
connObj.BeginTrans
... Insert [Commit] ...
connObj.CommitTrans
(behaves as cooresponding transactions w/o Begin and Commit above)
Any help would be greatly appreciated.
Mark
Once someone selects an item to place in the cart, the form shoots them over to an intermediary page which adds the item to the cart and then returns them to the page they were on.
Here's the problem. I can't seem to commit the transaction via an Execute method using the current connection object. It raises a SQL syntax error every time. The insert appears in the database as verified by SQL Explorer, and by attempting a second insert of the same PK tuple <Session id, item number> raising a key violation error.
Given enough time, but not as long as a session timeout, the transaction posts and the shopping cart works as it should. But it seems bad form to force a coffee break everytime someone adds an item to the cart.
Also troubling is that update queries work instantaneously. I suspect it may be a dirty read.
Long story short, is there a way to commit a transaction on Progress from a VBScript/ASP page?
Things I've tried, and have failed:
connObj.Execute "INSERT INTO table(...) VALUES(...)"
(insert works, but takes maybe 5 minutes to commit)
connObj.Execute "INSERT INTO table(...) VALUES(...)"
connObj.Execute "COMMIT Work" | "Exec SQL COMMIT WORK" | "COMMIT"
(barfs raising Syntax error (7587))
connObj.BeginTrans
... Insert [Commit] ...
connObj.CommitTrans
(behaves as cooresponding transactions w/o Begin and Commit above)
Any help would be greatly appreciated.
Mark