Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change SET IDENTITY_INSERT from Fox
Message
De
30/06/2003 06:49:41
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00805093
Message ID:
00805212
Vues:
34
Hi Patrick

>I'd like to do something like
>? SQLEXEC(lnHandle,"SET IDENTITY_INSERT dbo.Auftrag ON")
>
>This returns 1, but unfortunately does not change the IDENTITY_INSERT-Setting of my Sql Server.
>
>Is there an other way or solution?

The code you are using is correct, and as Sergey has pointed out, your test for functionality is not conclusive. Try the following:
? SQLEXEC(lnHandle,"SET IDENTITY_INSERT dbo.Auftrag ON")
? SQLEXEC(lnHandle,"SET IDENTITY_INSERT <other table> ON")
If the second command fails - then all is well. If it succeeds, then you probably don't have sufficient rights on your log-in in order to do this. You need either 'sysadmin', 'db_owner', 'db_ddladmin' or must be the object owner.
----
Regards
Andy Kramek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform