Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding records to vfp table
Message
From
19/05/2006 08:34:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/05/2006 02:06:24
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01123484
Message ID:
01123522
Views:
16
>Hi
>I have an app that copies records to SQL and it works fine I wanted to try it against VFP tables but it crashes. It adds the first record fine but then return the error
>
>"Additional information: Column 'pk' is constrained to be unique. Value '' is already present."
>
>I have set the primary field "pk" as AutoInc and have a primary index on it. If I add records at the command window it works ok. So what have I forgotten to do?
>TIA
>Stuart

Stuart,
I don't know MM but sounds like you're trying to insert a record with a provided PK value and autoinc fields are readonly. What's your insertCmd?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform