0

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!

Panzercrisis
  • 4,590
  • 6
  • 46
  • 85

1 Answers1

-1

Er... you cant If you google either of these commands they give only full blown SQL as the supported versions.

Ian P
  • 1,724
  • 1
  • 10
  • 12