Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Microsoft's response on VFP Advanced
Message
De
18/12/2018 23:13:22
 
 
À
18/12/2018 19:31:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrats & ententes
Divers
Thread ID:
01664566
Message ID:
01664617
Vues:
78
>>>>>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.
>>
>>Tamar noticed the same thing when I was demoing some code.
>>I learned SPT early in 2001, and the source I used - I think it was VFP help- showed a separate SQLPrepare(). Since I cut and paste virtually all my command sequences from old code (if you saw me typing this you'd understand why) that's the way I've been doing it all this time.
>>It came in handy a few times by crashing before I got to the exec.
>>Yes, I still use ->!!
>
>Don't know if it was mentioned in the thread, but SQLPREPARE is how parameterized queries are protected from SQL Injection -- which is the single source of 51% of successful hacks. https://outpost24.com/blog/SQL-injections-cyberattacks
>
>Hank

Wow!
Great information, Hank.
I'll keep using it.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform