dbManager automatically handle disconnections?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
heroumi
Posts: 63
Joined: 28 May 2023, 13:18

dbManager automatically handle disconnections?

Post by heroumi »

Hi,
1.
Does dbManager connections automatically handle disconnections?
Is it any problem if I run multiple functions in a row with dbManager like this?
Thank you.

Code: Select all

var dbManager = getParentExtension().getParentZone().getDBManager();

FriendUpdate(dbManager, source_id, destination_id);
FriendAdd(dbManager, source_id, destination_id, position);
EdgeUpdate(dbManager, source_id, destination_id, position);


2.
Is it possible to get the key returned by executeUpdate? executeInsert can get it.
Executes a SQL INSERT command returning the key of the inserted row
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: dbManager automatically handle disconnections?

Post by Lapo »

Hi,
connections to the database are normally run in a local network so disconnections are highly unlikely. If you get disconnected in the middle of a DB transaction you will get a SQLException.

Is it any problem if I run multiple functions in a row with dbManager like this?

No it's not a problem.

Is it possible to get the key returned by executeUpdate? executeInsert can get it.

No that's not possible.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
heroumi
Posts: 63
Joined: 28 May 2023, 13:18

Re: dbManager automatically handle disconnections?

Post by heroumi »

thank for info :D
Post Reply