Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with GATHER and AutoInc fields?
Message
From
28/12/2008 15:19:58
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01369864
Message ID:
01369889
Views:
9
>>I'm not sure why do you want to use REPLACE after GATHER if you can change/set properties of the loCurrentJob object before GATHER.

Very good point. What was I thinking. Gotta get my OO thinking cap on.


>You can use SET AUTOINCERROR OFF to suppress the error or you can use REMOVEPROPERTY() to remove "ipkey" from loCurrentJob object.

Thanks UT team. I knew you all could help with this.

Thanks to Vladimir who also suggested RemoveProperty().










>
>>Need some guidance here... I am trying to copy the data in one record to a new record in the same table, then change the JobNo field to some new Job umber that I already have and validated as unique.
>>
>>The problem is that the table has an AutoInc field named "ipkey", and VFP does not want to let me do a GATHER for obvious reasons.
>>
>>So, I understand why it has this limitation because of autoinc, I just want to know how one works around it.
>>
>>Presently, to get around it, I am doing a REPLACE command on every field except ipkey, but I was hoping to use the SCATTER NAME / GATHER NAME method to avoid having to list out every field, and so I would have code that is independent of the field names.
>>
>>Here's what I wanted to use:
>>
>>Select 0
>>Use Jobs order jobno
>>... navigate to the desired record ..
>>SCATTER NAME loCurrentJob
>>Append Blank
>>Gather NAME loCurrentJob
>>replace JobNo with lcNewJobNo && a passed in value, already validated
Previous
Reply
Map
View

Click here to load this message in the networking platform