Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataclas/VFP Error when saving
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Dataclas/VFP Error when saving
Miscellaneous
Thread ID:
00705225
Message ID:
00705225
Views:
43
I am getting the following error when trying to save after adding a record:

OLE IDispatch exception code 0 from ADODB.Parameter: Application uses a value of the wrong type for the current operation...

Using the debugger I can see which parameter it is trying to create in the lsaveobjectstore procedure. The parameter in the save stored procedure is defined as CHAR(10). The field in the SQL table is defined as CHAR(10). The textbox on the form that refers to this field is set to max length of 10 characters. The table definition in SQL Server allows nulls ont his field - in this case it happens to be blank.

The line in the lsaveobjectstore procedure that it fails on is the one that assignes the value to the parameter object - .VALUE = lxvalue. lxvalue is a character type of length 10, the loCommand.PARAMETERS("@" + laMembers[lnKount,1]) refers to the correct field which is defined in SQL Server and in the SP's as above - as CHAR(10), allow nulls.

In other words - it appears to me that it is flagging a type mismatch when I am attempting to assign a CHAR(10) value to a CHAR(10) field! Help!


Randy
Next
Reply
Map
View

Click here to load this message in the networking platform