Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How would you do this?
Message
 
To
09/11/1999 22:02:39
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00287031
Message ID:
00289657
Views:
45
>>Works great. But from what I can tell there is no actual return value from the function so I'm checking the value of _TALLY. Is this what you meant or did I miss something?
>>
>
>I thought you were using a SQL back end and would send the query with SQLExec which returns a OK or Fail code.

Not a problem. In fact you gave me a heads up in case this is moved to SQL-Server which is highly possible.

>
>>
>>UPDATE InvoceHeader SET LockedByUser=UserName WHERE InvoceID=ID and LockedByUser=null
>>
>>IF _TALLY#0
>>    <code for modification>
>>ELSE
>>    =REFRESH()
>>    WAIT WINDOW "Invoice being updated by user "+UserName NOWAIT
>>ENDIF
>>
>>
>
>Make sure you using the TableName in the UPDATE?

I am.

>
>Or, My guess is you are not refreshing what you think you are. Put a Select v_invoice before the refresh.

The SELECT didn't work but your assumption got me thinking. I added GO RECNO() after the =REFRESH() line and now it works. What led me to try this was I ran 2 instances of VFP and opened the view in both. I changed the value to MAGEE in 1 using UPDATE. Then in the other I issued =REFRESH(). Then I issued ? LockedByUser and it showed .NULL. but when I issued BROWSE the field value was MAGEE.

Odd, sort of like having to remind VFP where it is. I would actually consider this a bug. What do you think?

>
>
>BOb
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform