Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT Bug?
Message
 
To
18/08/1997 12:27:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00045304
Message ID:
00045328
Views:
29
Richard,

As I look at these I'm surprised any of them give you correct results without a GROUP BY being specified. BTW these all leave you open to getting duplicate PK's as the table is not locked while you do this and another sattion can do it before you have completed adding you record. A much better approach is to keep a separate table with the next Id whihc you can select, lock, get your id, increment the Id, and UNLOCK. This preserves multiuser validity on the PK's obtained.

SELE FROM Issue MAX(VAL(cIssue_Pk)) AS pk INTO CURSOR CurIssue
SELE MAX(VAL(cIssue_Pk)) AS pk FROM Issue INTO CURSOR CurIssue
SELE MAX(VAL(cIssue_Pk)) FROM Issue AS pk INTO CURSOR CurIssue

The parenthetical comments only make your messages have more to read and take longer to respond to. They also irritate.

>If this has been documented previously, please excuse this post, otherwise just another screw-up by the boys at MS - where is 5.5 when you really need it?

Again why do you have throw daggers at the folks at Microsoft. BTW, they won't cause duplicate keys in your system <g>.

>
>Oh, yeah, Lewis just called me over to his machine to see where VFP would allow him to key local variables into his method code, and when he saved it (using Ctrl+S), they disappeared right before our eyes!!! He had to exit the form and pull it back up before he was allowed to save his changes. This form was NOT in Read Only mode. Yeah, one rock solid product we got here...

Was the title bar of the edit window telling you it was read only?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform