Home » U++ Library support » U++ Core » Limitation in Format() function?  
	
		
		
			| Limitation in Format() function? [message #13638] | 
			Fri, 18 January 2008 12:02   | 
		 
		
			
				
				
				
					
						  
						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 
 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 09:16:57 CET 2025 
 Total time taken to generate the page: 0.04905 seconds 
 |