Re: How to get the last IDNum created (IDNum >> Auto-increment)
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxx>
- Date: Sat, 12 May 2007 13:09:18 -0700
Oops, wrong group. No additional rowsets or output parameters in SQLCe.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxx> wrote in message
news:%231yXQENlHHA.1624@xxxxxxxxxxxxxxxxxxxxxxx
I'm sorry I don't program in dead languages... ;)
Not a clue. Actually, if you program ADO.NET correctly, the new ID should
come back as an additional rowset or (better yet) as an OUTPUT parameter.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"VJC" <VJC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:18535121-10DC-49B9-823C-01FA9890FD52@xxxxxxxxxxxxxxxx
Hello Bill,
Do you know the C++ equivalent of calling ExecuteScalar(), in order to
read
the identity var?
Thanks,
Vernon
"William (Bill) Vaughn" wrote:
Unless it's SQL Server when you should use SCOPE_IDENTITY()
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest
book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Bonny" <silvana.bonicelli@xxxxxxxxx> wrote in message
news:1178636198.650652.80400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 8 Mag, 14:12, Jessika <Jess...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I would like to know i have to do to get the last IDNum created just
after a
"INSERT" statement?
The IDNum is a filed that is auto-Increment.
Many thanks for your help.
Jess
Try with SELECT @@IDENTITY
.
- References:
- Re: How to get the last IDNum created (IDNum >> Auto-increment)
- From: Bonny
- Re: How to get the last IDNum created (IDNum >> Auto-increment)
- From: William \(Bill\) Vaughn
- Re: How to get the last IDNum created (IDNum >> Auto-increment)
- From: William \(Bill\) Vaughn
- Re: How to get the last IDNum created (IDNum >> Auto-increment)
- Prev by Date: Re: How to get the last IDNum created (IDNum >> Auto-increment)
- Next by Date: Re: Connection to database from application
- Previous by thread: Re: How to get the last IDNum created (IDNum >> Auto-increment)
- Next by thread: Re: WIN CE 5.0 and SQL 2005 - problem
- Index(es):
Relevant Pages
|