473,386 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

VB.NET Generated Insert Procedure

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
Nov 21 '05 #1
7 1126
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
Nov 21 '05 #2
Bruce,

"Bruce A. Julseth" <br***********@attglobal.net> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
Bruce,

"Bruce A. Julseth" <br***********@attglobal.net> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


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
Nov 21 '05 #4

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
Bruce,

"Bruce A. Julseth" <br***********@attglobal.net> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


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
Nov 21 '05 #5
Bruce,

This vbNet newsgroup is the correct one for the way you asked your question.

However, the newsgroup framework.adonet is certainly not a dead newsgroup.
It is the 6th most active dotnet newsgroups and certainly not a bad choise
to ask questions like this there.

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet
Cor
Nov 21 '05 #6
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.

Nov 21 '05 #7

"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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
Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bill Kellaway | last post by:
Hi there - this should be fairly simple for someone. Basically I can't figure out how to pass the parameters from ASP to a Stored Procedure on SQL. Here's my code: I just need to help in...
4
by: MUSTAFA IRSHAD | last post by:
DEAR SIRS, I AM DEVELOPING A SOFTWARE BY USING VB.NET AND SQLSERVER 2000 FOR A NETWORK ENVIRONMENT. I HAVE A BROBLEM THAT I HAVE A FIELD FOR PRIMERY KEY WHICH IS AUTO GENERATED. I NEED THAT WHEN...
0
by: Scarab | last post by:
Hi all, When I use following sql to get data in stored procedure, error occurs: insert into #tmp EXECUTE dbo.prc_1 @date1,@date1 Here is the source code, Thanks CREATE TABLE ( NULL , ...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
4
by: Ken D. | last post by:
I have an asp page that collects data on referrals. The user inputs the information and selects the rep to receive the referral. My data is being saved to a backend database (SQL) and the user is...
2
by: wombat53 | last post by:
Hi Group Are there any DB2 UDB ESE DPF V8.2 users exploiting "buffered inserts" (BIND parm INSERT BUF) *and* "multi-row INSERTS" (many rows associated with the VALUES clause of the INSERT to...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
3
by: hellboss | last post by:
Hi Everyone ! im using SQL SERVER 2005, My problem is, i am inserting a set of values into a table using a subquery, the problem occurs when i tried to get the auto generated column in the table...
1
by: EJO | last post by:
with sql 2000 enterprise Trying to build a stored procedure that will take the rows of a parent table, insert them into another table as well as the rows from a child table to insert into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.