Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary keys with sql and vfp
Message
From
16/01/2006 11:39:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01087199
Message ID:
01087211
Views:
15
>I can't go changing my primary key datatype, the entire application has been built for using integers. Isn't there another way?

Then there is ( < s > wish there weren't and everyone forced to use GUID) but I can't gurantee the reliability under all cases (not me SQL server actually).

If you're updating via a stored procedure then return Ident_current(tablename) - do not use SCOPE_IDENTITY() or @@Identity as they are worse. Read in SQL server books online why they are not reliable 100%.

Without a stored procedure you need to requery('viewalias'). However think twice if you really need that value.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform