Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Heads-up - potential SQL Server bug
Message
De
30/03/2010 20:23:34
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
30/03/2010 20:11:22
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01457886
Message ID:
01458164
Vues:
61
>>I'm working on a project inserting data into SQL Server 2005 (SugarCRM) via ODBC and SQLEXEC() etc.
>>
>>SugarCRM uses GUIDs as primary keys. They're not autogenerated, Sugar's business layer calls NewID() on inserts. If I'm inserting rows programmatically I need to get the primary key values back.
>>
>>One way to do this is by calling SCOPE_IDENTITY, @@IDENTITY etc. after the INSERT. But, a quick Google found a corner-case bug with these functions that is apparently not fixed even in SQL 2008:
>>
>>http://connect.microsoft.com/SQLServer/feedback/details/328811/scope-identity-sometimes-returns-incorrect-value
>>
>>Since this bug seems to crop up in parallel execution, larger installations may be more vulnerable than small ones based on SQL Server Express.
>>
>>While on the topic, is it possible to execute a stored procedure via ODBC and have it return an output that can be read in VFP? This seems to be the recommended approach.
>
>It has been shown that SQL Server 2005 + use of NewSequentialID permits much faster insertions and retrieval of records than NewID based GUIDs.

Good to know - thanks.

>Also, if you generate the GUIDs locally, you won't have to request them as a second step.

That's actually what I ended up doing.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform