Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 19th, 2004, 04:02 PM
Authorized User
 
Join Date: Jun 2003
Location: Richardson, Texas, USA.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Generated dataset and autoincrement

I have created a SQLDataAdapter that uses stored procedures. When I run my app. it retrieves the data in the table but the ID field does not have the correct values in it. It seems that the Dataset's ID field is regenerating new id's for the this field. If I run my stored procedure from the Query Analyzer the id fields contents are correct. Does anyone know why I am not getting the correct values back.

Thanks,

David
Reply With Quote
  #2 (permalink)  
Old May 14th, 2004, 12:47 PM
Authorized User
 
Join Date: Jun 2003
Location: Rochester, NY, USA.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi drbradley,

Hope you found your solution.

I was wondering if you would be so kind as to share
w/ us how you created a dataAdapter that uses SPs.

Thanks !
Reply With Quote
  #3 (permalink)  
Old May 15th, 2004, 04:06 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Use Configure Data Adapter on right-click on that!
after setting Connection select second type as (existing Stored porcedure) & go on ...

HTH

Always:),
Hovik Melkomian.
Reply With Quote
  #4 (permalink)  
Old May 15th, 2004, 10:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

I don't know why it would be an incorrect ID... Do you specify any sort of autoincrementing on this field when setting up the data set, or are you doing anything else to that column specifically, or is coming back from the database that way?

Posting code may help some more also.

Brian
Reply With Quote
  #5 (permalink)  
Old February 1st, 2005, 04:25 PM
Authorized User
 
Join Date: Jun 2003
Location: Irvine, CA, USA.
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I would also love to know how to get a recordset using a Stored Procedure through the SQLDataAdapter. I thought you had to use the
SQLCommand to run Stored Procedures...

I didn't understand Hovik's way to do it.

Could somebody please give a VB.NET coding example!

Thanks.

Rita
Reply With Quote
  #6 (permalink)  
Old February 2nd, 2005, 01:14 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Hi Rita:
I dont remember what was my last post here, but to getting recordset is pretty simple!
use DataAdapter genaretor & it'll help u to set that (use SP & ...)
then u'll fill it in a table in DataSet.
like:
Code:
sqlDataAdapter1.Fill(DataSet1, "urTableName");
remember we have no recordset in ADO.NET, & its called DataSet.
HTH.

Always:),
Hovik Melkomian.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dataset and autoincrement primary key be03024 ADO.NET 8 July 19th, 2009 12:09 PM
AutoIncrement Aaron Edwards ASP.NET 2.0 Basics 5 February 7th, 2007 02:37 PM
Problem with dataset autoincrement column Jayaram ADO.NET 0 December 4th, 2006 03:13 PM
setting autoincrement tbecker82 Access 3 June 20th, 2006 01:17 PM
PrimaryKeys, AutoIncrement gbilios VB.NET 2002/2003 Basics 4 June 9th, 2005 07:31 AM



All times are GMT -4. The time now is 02:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.