[Gambas-user] Sample using .begin, commit and roolback in mysql
Jose Daniel Santos Delgado
jdsantos1978 at ...626...
Fri Nov 11 10:49:36 CET 2005
It's quite simple. The only thing you must bear in mind is that when
you creates the database tables you must use a Datatype that admits
transactions. For instantce: InnoDB.
Once you to that, the process is straightforward:
private m_db as Connection
private sub whichEver(...)
m_db.Begin ()
m_db.Exec("INSERT INTO jander VALUES (1, 'hola', 'bye')
m_db.Exec("INSERT INTO peich VALUES (31, 'a gromenaüer')
' (...)
if ''''' WhatEver must rollback
m_db.RollBack()
endif
m_db.Commit()
end sub
Sorry if it's not a very elaborated answer: ;)
2005/11/11, Ignatius Syofian <isy21 at ...1082...>:
> Hi, all
>
> can i have some example using db.begin, db.commit and db.rollback in mysql ?
>
> present i use direct update without using db.commit or db.roolback
>
> thanks before
>
>
> --
> Regards,
>
> Ignatius Syofian
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list