Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL7 money fields and nulls problem
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL7 money fields and nulls problem
Miscellaneous
Thread ID:
00418547
Message ID:
00418547
Views:
40
I have a money field on a SQL7 table that is flagged to accept nulls. If i initialize a VFP textbox that's bound to the corresponding money field to NULL, and try to save the record (by calling an INSERT or UPDATE stored procedure), SQL gives the error:

"Implicit conversion from data type character to money is not allowed."

If i initialize the bound item to $0, SQL does NOT complain.

moneyfield = .null. ==> wont save
moneyfield = $0 ==> will save

Again, the field in SQL allows nulls.

Other (non-money) fields in the sql table accept nulls and there is no problem when saving records where these field values are nulls.

any ideas?
Reply
Map
View

Click here to load this message in the networking platform