U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Can not get a double from database
Can not get a double from database [message #17889] Mon, 01 September 2008 20:48 Go to previous message
kbyte is currently offline  kbyte
Messages: 87
Registered: July 2008
Member
Hi,
I am trying to get a double (I think) from a sqlite3 database but I see a bad number. Ints and Strings no problem.
Here the code:

if(!SQL.Execute(Format("Select sum(ammount) from Pags where Num_Cli_Pag=%d",nNumCli)))
{
PromptOK("Error!");
}
if(!SQL.Fetch())
{
edDeb.SetData("0");
}
else
{
double d=(double)SQL[0];
strTemp=Format("%f",d);
edDeb.SetData(strTemp);
}

What am I doing wrong?

Thank you

Alex
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SQL statment in constructor make program crash
Next Topic: MySql basic example
Goto Forum:
  


Current Time: Sun Apr 26 16:45:48 GMT+2 2026

Total time taken to generate the page: 0.00978 seconds