Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 14th, 2004, 07:59 AM
Authorized User
 
Join Date: Sep 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default data set

hi,
I have a data set filled with the table extracted from a data base, now i wish to extract the 1st 2 colums of 1st 2 rows , and save them in a string variable how to do this i am not getting that .
in VB.NET
dim myds as new dataset
' code to read table from the data base
' ..........
' ..........
dim str1 as string
dim str2 as string

str1 = myds.tables........... ' some thing i am not geting
str2 = myds.tables........... ' some thing i am not geting

thx for completing my code
 
Old October 14th, 2004, 05:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

str1 = myds.tables(0).rows(0).item(0)
str2 = myds.tables(0).rows(0).item(1)

assuming that this is the first table in your dataset. This would pull the 1st 2 columns values in the first row. To get the values in the second row:

str1 = myds.tables(0).rows(1).item(0)
str2 = myds.tables(0).rows(1).item(1)

J





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to update data to DB from data set umank.88 ADO.NET 1 May 7th, 2008 10:07 PM
data set row values MunishBhatia ASP.NET 2.0 Professional 0 November 16th, 2007 11:52 PM
Fill data set from data reader sunil menghani ADO.NET 3 March 29th, 2005 07:08 AM





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