empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Weidele <daniel.weid...@gmail.com>
Subject Prepared Statements
Date Fri, 15 Jul 2016 18:01:58 GMT
Dear group,

what is the use of the prepared statements mechanism when, as it appears to
me, the prepared statement is recreated with every call of
"db.executeInsert(cmd, conn);"?

In particular DBDatabaseDriver.class:541 to DBDatabaseDriver.class:547 do
not "reuse" any prepared statement, but a new prepared statement is
requested from the connection.

Am I using it correctly?

DBCmdParam myParam = myCmd.addParam(...);
for (String value : myValues)
{
 myParam.setValue(value);
 db.executeInsert(myCmd, myConn);
}

Thanks for help,
Daniel

Mime
View raw message