The similar problem is reported in mskb #
Q221750. Also make sure that you've the latest VFP ODBC driver installed. You can get it from MS VFP web site.
>I wrote a VFP6 application to copy changed data from a MS SQLServer database to another - in the process it has to build up some summary and statistical info on the updated data passing under its eyes so I decided to write it from scracth rather than use server replication - the app reads changed data from origin database, put it in a local cursor, do its stuff, and send the data to destination database. It works ok, now, and it is fairly general (that is, even if the database structures get changed it will continue to work as it is now).
>
>I had to face a problem, though, that forced me to resort to exceptional handling: when the origin database has a money column, VFP translates it to a currency field in the temporary cursor (say,
curOrg.valor), and that is good, I would say. However, when I try to
SQLPREPARE the
UPDATE or
INSERT statement with
?curOrg.valor, the ODBC driver complains by saying I have to perform an explicit conversion, since it won't allow for implicit conversions from varchar to money. That is, on the way out it maps currency fields to varchar.
>
>I solved the problem by performing an explicit conversion, but would like to know if: a) is this a bug or a feature? b) more important, are there any other cases of this same behavior regarding other column types? c) or are variables
allways mapped to varchar in SPT prepared statements?
--sb--