Versions des environnements
Hello Andrus,
"I want to specify data types for some columns only, not for all columns.
How this can be done ?"
you can map any column in the resultset to a specific type in the cursorschema parameter.
e.g.
lcSchema = 'foo1 N(1), foo2 N(1), foo3 L, foo4 C(254) NOCPTRANS, foo5 W'
IF SQLEXECEX(nconnh, csql,'','',0,lcSchema) < 0
one thing to note is that N(1) in FoxPro is not the same as NUMERIC(1) in most DMBS's. Sounds a little strange but FoxPro defines it differently.
In FoxPro the 1 represents only display size, including the minus (-) prefix on negative numbers and the decimal seperator, but you can store any numerical value into it. In most DBMS's NUMERIC(1) defines that only numeric values between -9 to 9 can be inserted. That's why a NUMERIC(12,2) datatype from MSSQL Server for example is mapped to N(14,2) by default.
And this should also be the cause of the problem you got in thread xyz from a few days ago where you wanted to insert a large numerics into a NUMERIC(10) column. Postgres will trigger error "Numeric overflow" (or something similar) if you try to insert numerics with more than 10 digits.
"I wrote in other thread today that VFP SQLEXEC() does not call FreeStmt(SQL_CLOSE) and FreeStmt(SQL_RESET_PARAMS) after error from ODBC."
Will you SQLEXECEX() make those calls? I'm sorry, I havent studied its source code."
I had a look at the links you posted but without having repro code I cannot tell you if SQLEXECEX would work. I tried downloading the repro code from your site but the file wasn't available anymore, you may send it to me by email and i'll have a look and correct SQLEXECEX if neccessary.
Regards
Christian
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement