Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp CustomDataClass flips syntax error at runtime
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00993018
Message ID:
00993043
Views:
20
>Hi Mere Mortals,
>
>One of my backends in an MM.NET application is a small vfp database that contains 6 small data tables.
>I have to write cutom data classes for my bizobjs because the VS data wizards treat vfp databases as second class citizens.
>I have been building custom data classes for 2 years now and have not run into this problem.
>The big difference between this custom data class and all the other ones that I have written is that unique key of the table I am accessing is an auto-incrementing Integer field type. In the past my unique key was a character type.
>
>I am having a problem with a CustomDataClass that I created for my bizobj.
>When I attempt to "update" the backend via the bizobj, the runtime flips me an error, which states:
>
>

>Syntax error.
>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
>

I'm guessing, but it's probably because you are attempting to update the IID field in your INSERT/UPDATE code. An auto-inc field is read-only. I'm not sure how the OLE-DB provider handles new PK's when they are auto-inc fields. I know in VFP 9 they added a new function, GETAUTOINCVALUE() to help you retrieve the PK of the newly added record. So, in the OLE-DB provider, it's probably not automatic.

HTH
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform