Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need automated way to drop default on primary key
Message
From
24/07/2003 13:10:55
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00813097
Message ID:
00813173
Views:
9
In SQL Server you will want to make your PK columns "Identity" data columns. They will automatically become integer.

PF

>I have a VFP 7.0 database that I will be converting to SQL Server.
>
>I have used a GetKey("TableName") function on all my primary keys to get the next key value when a new record is added.
>
>Before I send my database through Xcase to an SQL Server for processing I need to drop all the default values for my key fields in all my tables.
>
>Can someone give me a simple code that would do this automatically for all tables in a Database.
>
>Also I have not worked with SQL Server much, but what do I set my primary key values to in SQL server that will have the same result as my GetKey function? GetKey always new what the next key should be.
>
>Any help is appreciated.

(On an infant's shirt): Already smarter than Bush
Previous
Reply
Map
View

Click here to load this message in the networking platform