Yummy
1
Can anybody please advise how to get the error codes from SQL
e.g. I have code such as the following and am getting an error on the commit (the code works fine in smart client but fails in Web client):
success = plugins.rawSQL.executeSQL(‘canteen’, ‘orders’,sqlp2)
or
success = databaseManager.commitTransaction();
All I get is success = true or false, so how do I get the actual error code as I’ve no idea why the commit fails in web client only?
Thanks.
mboegem
2
Hi,
as far as I know the commit doesn’t work on directly executed SQL via the plugin.
Anyway, this is what should solve your problem:
var succes = plugins.rawSQL.executeSQL('canteen', 'orders',sqlp2);
if(!succes) application.output(plugins.rawSQL.getException());
ROCLASI
3
Hi Marc,
mboegem:
as far as I know the commit doesn’t work on directly executed SQL via the plugin.
This is what the Servoy 3.1 release notes say:
[enh] rawSQL plugin now uses the same transaction as the current client
So it seems it does work with db transactions.