473,848 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TableAdapter using SProc Returning IDentity

Let's say I have a tableAdapter which uses an Insert sProc -- the last line
in the sProc is a Select statement, returning the identity

in code, I write something like:
Dim myTA as (TableAdapter)
label1.text=MyT A.Insert_sproc

However, the label always gets 0, though the row is getting inserted
- - anyone know how I can fix this?
Jul 20 '06 #1
0 1009

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

Similar topics

0
1159
by: gdp | last post by:
hi...this is no doubt easy but I cant do it below is a sproc i am calling from an ASP page ------------------------------ CREATE PROCEDURE dbo.populate_MAIN_visitors @IP nvarchar(20), @passScreen int
2
16074
by: ImraneA | last post by:
Hi there Application : Access v2K/SQL 2K Jest : Using sproc to append records into SQL table Jest sproc : 1.Can have more than 1 record - so using ';' to separate each line from each other.
10
1726
by: Samuel Hon | last post by:
Hi I've written this sproc. Can any one suggest any optimisations to the main query and its sub-queries please? Truncated DDL after CREATE PROCEDURE dbo.spGetUnbilledInfoByClient ( @ClientID varchar(5), @Sort int = 0,
4
1833
by: Chad Micheal Lawson via .NET 247 | last post by:
I'm stumped at this point and I'm tired of trying things so I'mposting in hopes of some guru with a sharp eye. I have anasp.net app running on a local Win XP Pro box. Within the app,I call a SPROC and pass the info to the SQL box and it hiccups. I'll drop VS.NET into debug mode and step through the SPROCcreation and copy those values into Query Analyzer to get alittle more info. When I run the Query Analyer that data worksjust fine. What?! ...
0
1849
by: vbnetguy | last post by:
Hopefully someone has an answer for this or maybe I am missing something. I have a stored procedure - this stored procedure is used as my main insert for a tableadapter I am doing something like mypolicyadapter.Update(mydatatable) after I add the appropriate rows... In this stored procedure I am executing multiple other stored
4
2008
by: Greg | last post by:
Hello. I'm trying to get the primary key for a newly inserted row using ADO.NET and SqlServer. The convention seems to be to do this with the RowUpdated event, i.e. _sqlConnectionToTickerTextDb.Open(); SqlCommand cmdGetPK = new SqlCommand("SELECT @@IDENTITY", _sqlConnectionToTickerTextDb); object pkObject = cmdGetPK.ExecuteScalar();
1
13854
by: gmccallum | last post by:
I would have expected to be able to find this easily, but I couldn't. I am using the TableAdapter.Insert command to insert a record. I would like to then get an ID field from that record after insertion. How to I retreive the record just inserted? Gregory McCallum gmccallum@honovi.com
2
3985
by: needin4mation | last post by:
Hi, I have generated my queries and selected the refresh the table option. This creates a select after the insert to get the scope_identity() so that I can use that key value in another table, i.e. foreign keys. I have verified the existence of the select in the DAL .xsd file. I simply do not know how to get that value, the scope_identity() value. I know that it is selecting the value for me, but I have no idea how to get that selected...
1
6910
by: Tempera | last post by:
I add new row to DataTable (typed). I called TableAdapter.Upadte method. I noticed that field 'ItemId' (which is specified as Identity in SQL Server) has a value of new added item. This is great! Is this feature documented? Can i use it in production? I also noticed when using Access, AutoNumber field as ItemId, this feature
0
9893
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10665
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10723
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9501
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7894
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5735
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4139
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3177
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.