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++ Core » Limitation in Format() function?
Limitation in Format() function? [message #13638] Fri, 18 January 2008 12:02 Go to previous message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Hi
I am trying to send an SQL command to SQLite database and I an building it using the Format function. Target databse table has lots of fields.
IF I use more then ten % in the first argunt of the Format function and erro appears like this:

error: invalid conversion from `const char*' to `int'
error: initializing argument 1 of `Upp::String Upp::Format(int, const char*,Upp::Value, Upp::Value, Upp::Value,Upp::Value, Upp::Value, Upp::Value, Upp::Value, Upp::Value, Upp::Value, Upp::
Value)'

Example:

This works: strSQL=Format("( ...) %d,'%0.2d-%0.2d-%0.2d','%s',%d,'%s','%0.2d-%0.2d-%0.2d')",1,2008,1,1, "aaa",1,"aaa",2008,1,1);

This doesnt works: strSQL=Format("( ...) %d,'%0.2d-%0.2d-%0.2d','%s',%d,'%s','%0.2d-%0.2d-%0.2d',%d)",1,2008,1,1, "aaa",1,"aaa",2008,1,1,1);


Is that a limitation?

Alex

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: logs in release builds (801.r97, SVN rev 90)
Next Topic: DLI does not compile
Goto Forum:
  


Current Time: Fri Jun 13 20:37:23 CEST 2025

Total time taken to generate the page: 0.04225 seconds