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 » Issue with sql.execute(const String&)
Re: Issue with sql.execute(const String&) [message #28472 is a reply to message #28433] Thu, 02 September 2010 21:38 Go to previous messageGo to previous message
BioBytes is currently offline  BioBytes
Messages: 310
Registered: October 2008
Location: France
Senior Member
Thank you very much for your reply. Your code is ok. My problem is that it is not possible to build the query as shown in the attached file. In my project, the user can select different parameters to include dynamically the query by checking option boxes and selecting the wanted specific data in the droplist associated with the box.

Therefore I reviewed my code to test every combination to build the corresponding sql query as shown in the attached file but it is a bit complicated.

I also used Code::Blocks with wxWidgets and DatabaseLayer libs and the sql query can be build in runtime as follows:

wxString query;
wxListBox *lb1;
wxListBox *lb2;

query.Append(_T("Select * from codetechnic where code famille="));
query.Append(_T("'"));
query.Append(lb1->GetStringSelection());
query.Append(_T("'"));
query.Append(_T(" and codeproduit=");
query.Append(_T("'"));
query.Append(lb2->GetStringSelection());
query.Append(_T("'"));

DataResultSet *res=dbLayer->RunQueryWithResults(query);

while(res->Next())
{
.....
}


This code works perfectly. I would like to do the same with U++.

Thank you for helping me

Kind regards
Biobytes
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQlite3: my problem or bug?
Next Topic: Compiling error for mysql
Goto Forum:
  


Current Time: Mon Aug 25 12:04:32 CEST 2025

Total time taken to generate the page: 0.06357 seconds