Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
BioBytes is currently offline  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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Missing ASSERT?
Next Topic: In Oracle9 and higher, TIMESTAMP data type will cause ORA-1402 exception w/ Oracle8 Oci8.cpp
Goto Forum:
  


Current Time: Sat May 18 19:00:18 CEST 2024

Total time taken to generate the page: 0.01667 seconds