VB.NET Generated Insert Procedure

  • Thread starter Thread starter Bruce A. Julseth
  • Start date Start date
B

Bruce A. Julseth

A couple of questions about a Generated Insert Procedure.

1. Why is there a "SELECT " statement after the insert?

2. This SELECT statement has "WHERE (PrimaryKey = @@IDENTITY)". I "assume"
that @@IDENTITY represents the newly generated "primary key" for the record
that was inserted. Is that something internal to the processing generated
this?

Thank you...

Bruce
 
Bruce,
A couple of questions about a Generated Insert Procedure.

1. Why is there a "SELECT " statement after the insert?

2. This SELECT statement has "WHERE (PrimaryKey = @@IDENTITY)". I "assume"
that @@IDENTITY represents the newly generated "primary key" for the
record
that was inserted. Is that something internal to the processing generated
this?

This has to do with auto generated uniqueidentifieres as primarykey

I hope this gives an idea

Cor
 
Bruce,

Bruce A. Julseth said:
A couple of questions about a Generated Insert Procedure.

I suggest to post database-related questions to more appropriate groups, for
example, microsoft.public.dotnet.framework.adonet.
 
Herfried K. Wagner said:
Bruce,



I suggest to post database-related questions to more appropriate groups, for
example, microsoft.public.dotnet.framework.adonet.

Herfried:

I will follow you suggestion, but since this statement is generated by
VB.NET, in a VB.NET project, it seemed that VB.NET was the correct place to
the query..

Thank you..

Bruce
 
Herfried K. Wagner said:
Bruce,



I suggest to post database-related questions to more appropriate groups, for
example, microsoft.public.dotnet.framework.adonet.

Herfried:

I just looked at microsoft.public.dotnet.framework.adonet. It is a very
INACTIVE newsgroup. The last post was Jan 24th...

As such, I think this newsgroup is the correct.

OBTW: I'll still post on that newsgroup..

Thanks..

Bruce
 
What do you use as your newsreader? Do you use Google Groups? I'm
showing numerous posts dated today, many for yesterday and days past.
Many posts show since Jan 24th.

Perhaps your news reader software is not refreshing?

Anyway, good luck with your problem.
 
Chris Dunaway said:
What do you use as your newsreader? Do you use Google Groups? I'm
showing numerous posts dated today, many for yesterday and days past.
Many posts show since Jan 24th.

Perhaps your news reader software is not refreshing?

Anyway, good luck with your problem.

Dumb mistake on my part.. I subscribed to ......br.dotnet.framework.ado...

Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top