Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Type Mismatch
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00118248
Message ID:
00118867
Views:
21
>>I have a weird line of code that I can't get to behave, normally a very simple process:
>>
>>INSERT INTO EntHead ( PKey, CustFKey, EntryNo ) VALUES ( nPKey, Customer.PKey, cEntryNo )
>>
>>Whenever that line is invoked, I get an Error #9--Data Type Mismatch. However, the data types do not mismatch (they are N (Int), N (Int) and C respectively). When I clear the error message, the record is properly appended and all three fields are properly filled in. I have tried eliminating the fields one at a time. If I, for example, only put PKey and nPKey in the INSERT INTO line, I get a Mismatch error. nPKey is the last used PKey + 1--definitely not a mismatch. I have moved the line around and even re-typed it. Same thing--the error follows this line. Everything works fine after I clear the error message, but I can't give the program to my client like this.
>>
>>Anybody seen anything like this?
>>
>>TIA.
>>
>>John
>
>John,
>
>Have you checked the index expressions for the table you are inserting into. One of those may be giving you the error.

Data Type Mismatches may show up on *unexpected* lines of code, like ENDSCAN, INSERT, if a relational expression, based on a variable, is no longer viable.

HTH
Glenn
Previous
Reply
Map
View

Click here to load this message in the networking platform