Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help needed with BEGINTRANS

jlegjleg Member Posts: 237
Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?

I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK

Thanks

John ;-)

Comments

  • GideonOmegaGideonOmega Member Posts: 617
    [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    :
    : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    :
    : Thanks
    :
    : John ;-)
    :
    after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.

    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]



  • jlegjleg Member Posts: 237
    : [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    : :
    : : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    : :
    : : Thanks
    : :
    : : John ;-)
    : :
    : after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.
    :
    : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    : there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.
    :
    : [blue]
    : C:Dos
    : C:Dos Run
    : Run Dos Run
    : [/blue]
    :
    :
    :
    :

  • jlegjleg Member Posts: 237
    : : [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : : : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    : : :
    : : : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    : : :
    : : : Thanks
    : : :
    : : : John ;-)
    : : :
    : : after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.
    : :
    : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    : : there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.
    : :
    : : [blue]
    : : C:Dos
    : : C:Dos Run
    : : Run Dos Run
    : : [/blue]
    : :
    : :
    : :
    : :
    :Thanks, I've seen this event, but not any examples of their use. I have also checked the link. I'm pretty much aware of the BEGINTRANS etc commands.

    Do you know of any examples of BEGINTRANSCOMPLETE and when this event can be called. I suppose I could use it to set a flag. But thats pretty much what I do now on a BEGINTRANS and then I reset it ON either ROLLBACKTRANS or COMMITTRANS.

    I'm wondering if I could uses the event (BEGINTRANSCOMPLETE) in any way to test the current status of the connection? The event itself does not appear in my object browser so I'm wonder if its available anyway. I'm using MDAC 2.7

    Any additional help would be most appreciated.

    John ;-)
    :

  • GideonOmegaGideonOmega Member Posts: 617
    [b][red]This message was edited by Moderator at 2004-4-27 5:53:21[/red][/b][hr]
    : : : [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : : : : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    : : : :
    : : : : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    : : : :
    : : : : Thanks
    : : : :
    : : : : John ;-)
    : : : :
    : : : after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.
    : : :
    : : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    : : : there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.
    : : :
    : : : [blue]
    : : : C:Dos
    : : : C:Dos Run
    : : : Run Dos Run
    : : : [/blue]
    : : :
    : : :
    : : :
    : : :
    : :Thanks, I've seen this event, but not any examples of their use. I have also checked the link. I'm pretty much aware of the BEGINTRANS etc commands.
    :
    : Do you know of any examples of BEGINTRANSCOMPLETE and when this event can be called. I suppose I could use it to set a flag. But thats pretty much what I do now on a BEGINTRANS and then I reset it ON either ROLLBACKTRANS or COMMITTRANS.
    :
    : I'm wondering if I could uses the event (BEGINTRANSCOMPLETE) in any way to test the current status of the connection? The event itself does not appear in my object browser so I'm wonder if its available anyway. I'm using MDAC 2.7
    :
    : Any additional help would be most appreciated.
    :
    : John ;-)
    : :
    :
    :

    I will have a look and see if I can find any examples - but I'm guessing it works simalar to the events in winsock for the data tranfers, more specificly I belive there is a transfer complete event -which will fire on it's own when the event happens, now are you trying to test the status of your connection object or just checking to see if the begintrans has completed -- I know it is easy to check the connection object, but I havn't used the begins trans events before so i'll look for some examples and see If I can find the event in question.

    I found this: http://www.devguru.com/Technologies/ado/quickref/connection_begintranscomplete.html

    it has an example of using begintranscomplete

    hope it helps.

    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]



  • jlegjleg Member Posts: 237
    : [b][red]This message was edited by Moderator at 2004-4-27 5:53:21[/red][/b][hr]
    : : : : [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : : : : : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    : : : : :
    : : : : : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    : : : : :
    : : : : : Thanks
    : : : : :
    : : : : : John ;-)
    : : : : :
    : : : : after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.
    : : : :
    : : : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    : : : : there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.
    : : : :
    : : : : [blue]
    : : : : C:Dos
    : : : : C:Dos Run
    : : : : Run Dos Run
    : : : : [/blue]
    : : : :
    : : : :
    : : : :
    : : : :
    : : :Thanks, I've seen this event, but not any examples of their use. I have also checked the link. I'm pretty much aware of the BEGINTRANS etc commands.
    : :
    : : Do you know of any examples of BEGINTRANSCOMPLETE and when this event can be called. I suppose I could use it to set a flag. But thats pretty much what I do now on a BEGINTRANS and then I reset it ON either ROLLBACKTRANS or COMMITTRANS.
    : :
    : : I'm wondering if I could uses the event (BEGINTRANSCOMPLETE) in any way to test the current status of the connection? The event itself does not appear in my object browser so I'm wonder if its available anyway. I'm using MDAC 2.7
    : :
    : : Any additional help would be most appreciated.
    : :
    : : John ;-)
    : : :
    : :
    : :
    :
    : I will have a look and see if I can find any examples - but I'm guessing it works simalar to the events in winsock for the data tranfers, more specificly I belive there is a transfer complete event -which will fire on it's own when the event happens, now are you trying to test the status of your connection object or just checking to see if the begintrans has completed -- I know it is easy to check the connection object, but I havn't used the begins trans events before so i'll look for some examples and see If I can find the event in question.
    :
    : I found this: http://www.devguru.com/Technologies/ado/quickref/connection_begintranscomplete.html
    :
    : it has an example of using begintranscomplete
    :
    : hope it helps.
    :
    : [blue]
    : C:Dos
    : C:Dos Run
    : Run Dos Run
    : [/blue]
    :
    :
    :
    :
    Thanks G
    I have looked at the info. Its very helpful. Probably not exactly what I require but may be a little neater for setting my flags.

    Much appreciated.

    John ;-)

  • GideonOmegaGideonOmega Member Posts: 617
    : : [b][red]This message was edited by Moderator at 2004-4-27 5:53:21[/red][/b][hr]
    : : : : : [b][red]This message was edited by Moderator at 2004-4-23 5:35:41[/red][/b][hr]
    : : : : : : Is there any way to find out if a BEGINTRANS on an ADODB connection has already been performed?
    : : : : : :
    : : : : : : I have been using flags to check but thought there may be a function that can notify me. I sometimes have a problem when I go to close the connection. My program tells me that I can't because I haven't performed a COMMITTRANS or ROLLBACK
    : : : : : :
    : : : : : : Thanks
    : : : : : :
    : : : : : : John ;-)
    : : : : : :
    : : : : : after reading your post I thought I would check out msdn and I found the following link - there are some events that fire after begintrans, committrans, and roolback are finished so check it out and let me know if it helps.
    : : : : :
    : : : : : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdevtbegintranscomplete.asp
    : : : : : there is also a link on the bottom of that page to a vb example showing how to work with begintrans and rollback and whatnot.
    : : : : :
    : : : : : [blue]
    : : : : : C:Dos
    : : : : : C:Dos Run
    : : : : : Run Dos Run
    : : : : : [/blue]
    : : : : :
    : : : : :
    : : : : :
    : : : : :
    : : : :Thanks, I've seen this event, but not any examples of their use. I have also checked the link. I'm pretty much aware of the BEGINTRANS etc commands.
    : : :
    : : : Do you know of any examples of BEGINTRANSCOMPLETE and when this event can be called. I suppose I could use it to set a flag. But thats pretty much what I do now on a BEGINTRANS and then I reset it ON either ROLLBACKTRANS or COMMITTRANS.
    : : :
    : : : I'm wondering if I could uses the event (BEGINTRANSCOMPLETE) in any way to test the current status of the connection? The event itself does not appear in my object browser so I'm wonder if its available anyway. I'm using MDAC 2.7
    : : :
    : : : Any additional help would be most appreciated.
    : : :
    : : : John ;-)
    : : : :
    : : :
    : : :
    : :
    : : I will have a look and see if I can find any examples - but I'm guessing it works simalar to the events in winsock for the data tranfers, more specificly I belive there is a transfer complete event -which will fire on it's own when the event happens, now are you trying to test the status of your connection object or just checking to see if the begintrans has completed -- I know it is easy to check the connection object, but I havn't used the begins trans events before so i'll look for some examples and see If I can find the event in question.
    : :
    : : I found this: http://www.devguru.com/Technologies/ado/quickref/connection_begintranscomplete.html
    : :
    : : it has an example of using begintranscomplete
    : :
    : : hope it helps.
    : :
    : : [blue]
    : : C:Dos
    : : C:Dos Run
    : : Run Dos Run
    : : [/blue]
    : :
    : :
    : :
    : :
    : Thanks G
    : I have looked at the info. Its very helpful. Probably not exactly what I require but may be a little neater for setting my flags.
    :
    : Much appreciated.
    :
    : John ;-)
    :
    :

    No problem, I'm always here to help, it helps me too -- as I havn't looked at trans code for ado before, I probably should as I use SQL Server on Occation.

    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

Sign In or Register to comment.