John Baird
Coatesville, Pennsylvania, United States
Environment versions
Network:
Windows 2003 Server
>>>I need to return back SCOPE_IDENTITY() as well as NewID(). Or at least NewID() that I'm putting there as ID of the order may not be that important, though I may want to display it.
>>>
>>>I can not use SP as it's SQL Server CE.
>>>
>>>Appreciate your ideas.
>>
>>
>>You cannot batch calls to sqlce. the sample code shows how to do this..
>
>John,
>
>Are you sure this would not work
>INSERT INTO [Orders] ([OrderPk], [OrderDate]) VALUES (@NewOrder, GetDate()); return Scope_Identity()
>
>and I need to use the exact idea from your article?
>
>Thanks again.
SQLCe does not support batch queries. You cannot chain commands with ';' and get them to work. Follow the method from my article, AFAIK, its the only way to get the identity.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only