Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change SET IDENTITY_INSERT from Fox
Message
From
30/06/2003 06:49:41
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00805093
Message ID:
00805212
Views:
35
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform