Hi again!
I found a bug in mi code.
I've been using the next code in a For Loop for C := 0 to N. works well until some value (C is the number of lines in a stringlist used to fill the query)
The code add a new line on AdsQuery, getting data from some parameters (const data for this query) and other data from tstringlist.
QryCtaCte.SQL.append('(:Al ,'+QuotedStr(concept.Strings[c])+',+cast('+quotedstr(price.Strings[c]) +'as SQL_double),:CIC, cast('+ quotedstr(venc[c])+' as sql_date), :Gru, 0, False, 0,:F),');
Characters in bold are parameters then in other line I assign values to them
I have the error
poQuery: Error 7200: AQE Error: State = 07006; NativeError = 2236;
[iAnywhere Solutions][Advantage SQL Engine]
Conversion error with scalar CAST -- Location of error in the SQL
statement is: 203 (line: 16 column: 23)
Error occurs when the value of quotedstr(price.Strings[i]) is decimal, has comma and decimals. Wich is right because is a Price. When value is integer works fine.
I quotedstr and casted the string to double and sql_money but doesn't works.
I cannot pass the price by parametter because I've got this price after search a price list and stored all prices for the same product in differents stores and dodn't know how many prices will found. So when I found a price add the value to a temporary stringlist.
I hope, as allways you can help me.
Thanks everyone