• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VB6 Programmers - I need your help

creeperza2000

Junior Member
Hey there,

I've got a few small problems with a VB project I'm doing. I can't seem to figure out how to "Commit" and "Rollback". I've been fiddling with the code and can't seem to get it to work. If anyone has an example of these two commands, I would greatly appreciate it.

Also, if I needed to print out a report, would I have to first create a "Data Report" in VB and then print it? How would I go about doing this - if anyone knows.

Thanks in advance
 
Let's say connection is your DB connection.

Public Sub test()
On Error Goto test_error

connection.BeginTrans
...
connection.CommitTrans

Exit Sub

test_error:
connection.RollbackTrans

End Sub

 
Back
Top