In my SQL Server Compact Edition database, this works:
INSERT INTO Clients (Title, FirstName, MiddleName, LastName, Suffix, IsMale)
VALUES (NULL, NULL, NULL, NULL, NULL, NULL)
But this doesn't work:
INSERT INTO Clients (Title, FirstName, MiddleName, LastName, Suffix, IsMale)
VALUES (NULL, NULL, NULL, NULL, NULL, NULL); SELECT @@IDENTITY
What's the dialectual hold-up here? I am passing it all in as only one string/command to SQL Server CE from VB.Net, if that makes any difference.
Originally I tried doing this with SCOPE_IDENTITY() and would have strongly preferred that, but apparently that's not supported? If there is a work-around to the SCOPE_IDENTITY() issue, I would prefer an answer involving that work-around; if not, then I'd be good with an answer involving @@IDENTITY.
Thanks!