General information
Category:
Coding, syntax & commands
Harry,
I ran into a similar problem a couple of weeks back. I was appending from a text file and the stored proc wasn't firing. I decided that somehow VFP saw the non-existent text fields as a bunch of blanks and decided that that was "data" so it didn't need a default value.
I solved the problem by creating an interim cursor which did not have the ID field, then appending from the interim cursor to the main table. Then the stored proc fired and I got nice PK's for my records.
I really wonder why this happens, but I got sidetracked and never posted the question for a "guru" to explain.
Try the interim cursor method and see if it helps you.
>got m'self a cheap and cheerful (and effective) stored procedure for assigning primary keys which is called from the default value for the relevant field.
>
>It works for "append blank" or "insert into" but not for "append from"
>
>I can see that "append from" may, of course, add a whole bunch of records and thus call the routine a whole bunch of times. But a) I've never come across anything that says it can't be done that way and b) if it is going to fall over I'd have expected to fall over at the second appended record. It doesn't even manage one.
>
>what have I missed? and, if it can't be done that way for "Append From", how else can we do it?
>
>Harry
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only