Hi, Jim!
Tableupdate command checks fields status autmatically and will never generate UPDATE command when cursor don't contain changes in updatable fields. At least I tested this for SQL Server. When I use tableupdate for view without changes, in SQL Profiler Trace log I don't see updating command sent. So such checking is not needed, I guess.
>>Hi
>> Thank you all of you because you have give me alot of free lesson !!! Thank you cery much.
>> I have an question again, I still can't get the purpose of ussing GetfldState in our application. Could you give me any example of situation?
>
>John,
>
>Ok, here's one. I have a Save button, it calls a method of the form to SaveChanges. The form SaveChanges method does a tableupdate on the table. I don't want to do the tableupdate unless the user changed something, so I put code like this in the SaveChanges method;
>
>
>* Form's SaveChanges method
>SELECT TheTableAlias
>LOCAL lcFldState
>lcFldState = GetFldState(-1)
>IF NOT ("2" $ lcFldState OR "4" $ lcFldSate)
> * User made no changes to the record
> IF "3" $ lcFldState
> * The record is a newly append one so revert the appended record
> TableRevert(1,.F.,"TheTableAlias")
> ENDIF
> RETURN
>ENDIF
>* Tableupdate stuff here
>
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #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.