Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update conflict
Message
From
08/01/2001 16:49:52
 
 
To
07/01/2001 21:10:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00459687
Message ID:
00460834
Views:
14
Hi!

Use GetFLDState function just after INSERT and APPEND BLANK commands. For INSERT it returns 3 for all fields except used in the INSERT command. Despite these fields use default values, they marked as inserted only, not as inserted and modified (4 in GetFLDState). Thus, command for insertion to server contains only thous fields that are marked by '4' -> default values from table are not overwritten.

As opposite, APPEND BLANK marks all fields by '4' (inserted and modified). This cause all fields participated in INSERT underlying command during update of table, that overwrites default values.

If you want to guarantee your field to be updated in new record, user extra replace for it after INSERT command, or just include it into INSERT command for view.


>Good monring.. sorry to disturb u again.
>
>I find the strange behaviour :
>
>if I use INSERT INTO command, the base table will auto generate new ID eg:
>
>INSERT INTO viewPO (keyInDate,keyinBy) WITH (DATETIME(),userID)
>
>the viewPO have PK value 1 and
>the PO have PK value 2
>
>IF I use APPEND command then it work ok, eg,
>
>SELE viewPO
>APPEND BLANK
>REPL keyInDate WITH DATETIME(),;
> keyInBY WITH userID
>
>then viewPO have PK value 1 and
> PO have PK value 1
>
>Why??
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform