Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from a table with autonum
Message
From
07/06/2011 18:12:58
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01513452
Message ID:
01513456
Views:
40
I believe you can use
CursorSetProp("AutoIncError", .F.)
which essentially does not complain about the autonum field problems.



>Thanks for the quick response, Craig. Actually the receiving table also has an autonum field (they are both basically identical tables), so I'm not sure that appending from a temp cursor would help - wouldn't I get the same message?
>
>
>>You have to append to a temp table or cursor, populate the id column there with the values you want for the master table, then append from the temp to the master table.
>>
>>Or, write code to append a record at a time, update the id, then do the next record.
>>
>>>I'm copying table contents from one file to another and ran into an error while copying a table with an autonumber field. It says the field is read-only (which makes sense, I guess), and won't copy the records using an append from statement. Is there a quick/standard way to get around this? I know I could do a file copy, but was hoping to just pull records as needed from the other table.
>>>
>>>As always, thanks in advance.
Jim Nelson
Newbury Park, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform