MySql Transaction and oRs:Save()

MySql Transaction and oRs:Save()

Postby vilian » Tue Jul 09, 2024 1:17 pm

Do you know if there is a transaction control inside oRs:Save()?
If there is, is possible disable it ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 960
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: MySql Transaction and oRs:Save()

Postby ShumingWang » Wed Jul 10, 2024 2:10 am

if set autocommit=0;
//oserver:query("set autocommit=0")
oserver:query(" start transaction")
... update/sve/insert/delete sql

if ... error
oserver:query("rollback")

else
oserver:query("commit")

end
//
if set autocommit=1;
... single sql include commit /rollback
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
ShumingWang
 
Posts: 461
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: MySql Transaction and oRs:Save()

Postby vilian » Wed Jul 10, 2024 11:02 am

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 960
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 76 guests