Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRANSACTIONs
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00483603
Message ID:
00483606
Views:
7
I just discovered that transactions don't apply to free tables, which is what I must use in this SBT-based product. If anyone has any suggestions regarding an alternate way to populate a unique ID, I'd be happy to hear it! Thanks,

Joy

>I have an issue with a transaction. The program assigns a remoteid to each new record which gets added. So that two users can't simultaneously add the same remoteid, I've used a transaction:
>
>WITH THISFORM
>BEGIN TRANSACTION
> * Add to the header:
> SELECT a_arpthd
> APPEND BLANK
> SELECT MAX(RemoteID) AS MaxRemote FROM a_Arpthd INTO CURSOR c_Temp
> .prpRemoteID =c_Temp.MaxRemote +1
> REPLACE ;
> ProjectID WITH mProjectID, ;
> Techno WITH .prpVendno, ;
> Date WITH .prpDate, ;
> RemoteID WITH .prpRemoteID, ;
> Address WITH .txtAddress.Value, ;
> Adduser WITH gc_userid, ;
> Adddate WITH DATE(), ;
> Addtime WITH TIME()
>END TRANSACTION
>SELECT c_temp
>USE
>ENDWITH
>
>I thought that by doing this in a transaction, it would run all of those commands "simultaneously" (sort of) and make sure it didn't do one without the other. However, I'm still getting duplicate remoteid's. Does anyone have a better way? I'd prefer not to use another file that has the remoteid ticker in it, but if I must I will.
>
>TIA
>Joy
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform