Home » U++ Library support » U++ SQL » Strange exception raising with SQL.ExecuteX()
Re: Strange exception raising with SQL.ExecuteX() [message #30272 is a reply to message #30166] |
Tue, 21 December 2010 14:30 |
|
BioBytes
Messages: 307 Registered: October 2008 Location: France
|
Senior Member |
|
|
Hi all,
I solved this problem by using SqlId syntax. The following code works perfectly and does not raise any unexpected exception :
void qsSKillFormDlg::RefreshInfosProcOwner(String newValue,String owner,int fieldId)
{
SqlId TBLOWN("OWNERS"),FIRSTNAME("OWNERFIRSTNAME"),FAMILYNAME( "OWNERNAME");
Vector<String> infos;
try
{
infos.Clear();
infos = Split(infosProcOwner.At(2),' ',false);
infosProcOwner.At(2).Clear();
switch(fieldId)
{
case 0: infosProcOwner.At(2)<<infos.At(0)<<' '<<newValue;
SQL &SqlUpdate(TBLOWN)(FAMILYNAME,newValue).Where(FAMILYNAME ==owner);
break;
case 1: infosProcOwner.At(2)<<newValue<<' '<<infos.At(1);
SQL &SqlUpdate(TBLOWN)(FIRSTNAME,newValue).Where(FAMILYNAME= =owner);
break;
}
}
catch(SqlExc& err)
{
PanicMessageBox(t_("Erreur SQL"),err);
}
}
To avoid problems with the MySql engine, SqlId syntax must be used.
The problem should be considered closed.
Regards
Biobytes
|
|
|
Goto Forum:
Current Time: Sat May 18 19:00:18 CEST 2024
Total time taken to generate the page: 0.01667 seconds
|