Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft's response on VFP Advanced
Message
From
18/12/2018 13:31:26
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
18/12/2018 09:41:27
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Miscellaneous
Thread ID:
01664566
Message ID:
01664607
Views:
108
>>parentid = curnewtrans->newtrans

Thanks for the -> , a reminder of good old days I'd not seen since well before the mdot wars. ;-)

As Kevin notes, I'm referring to the Sequence feature added in SQL Server 12. It's a very efficient way to get a unique value before you commit, and an easy way to convert a dbc's Autoinc SP or function if one of those is still in use. It's quicker and more efficient than GUID and includes the ability to "cache" sets of (say) 10 values that get doled out without updating the underlying resource until another batch is needed.

It also turns out that the default field type for Sequence is bigint and you can overcome this issue by defining the Sequence as INT. So much for a bug!

As an aside: if your commandstring is parameterized, I think SQL Server automatically caches the plan whether you SQLPrepare() or not. Or so I'm told.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform