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 » Can not get a double from database
Re: Can not get a double from database [message #18030 is a reply to message #17889] Sun, 07 September 2008 11:24 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
kbyte wrote on Mon, 01 September 2008 14:48

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


Well, a couple of things (using SQL for select, probably using EditString to edit double...), but nothing related to the problem.

Small testcase would help.

Mirek
 
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: Wed Jun 25 10:03:23 CEST 2025

Total time taken to generate the page: 0.04385 seconds