473,396 Members | 2,024 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,396 software developers and data experts.

how to get first row results

If my query results are more tha one row, how do I point to the firstrow and
the to the second row etc, to bind the data to textboxes?
Nov 19 '05 #1
4 1364
are you getting the data into a SqlDataReader? A dataset??? ?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Gert Albertse" <Ge**********@discussions.microsoft.com> wrote in message
news:38**********************************@microsof t.com...
If my query results are more tha one row, how do I point to the firstrow and the to the second row etc, to bind the data to textboxes?

Nov 19 '05 #2
How do you read your query results ? If you're using DataSet use:
myDataSet.Tables[0].Rows[Index]
If you're using DataReader, just use ReadNext method

Regards,
Kostadin Kostov

"Gert Albertse" wrote:
If my query results are more tha one row, how do I point to the firstrow and
the to the second row etc, to bind the data to textboxes?

Nov 19 '05 #3
I'm using IDbDataAdapter and a dataset

"Karl Seguin" wrote:
are you getting the data into a SqlDataReader? A dataset??? ?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Gert Albertse" <Ge**********@discussions.microsoft.com> wrote in message
news:38**********************************@microsof t.com...
If my query results are more tha one row, how do I point to the firstrow

and
the to the second row etc, to bind the data to textboxes?


Nov 19 '05 #4
Kostadin answered your question then...

//c#
ds.Tables[0].Rows[0]["ColumnName"]

'vb.net
ds.Tables(1).Rows(0)("ColumnName")

Cheers,
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Gert Albertse" <Ge**********@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
I'm using IDbDataAdapter and a dataset

"Karl Seguin" wrote:
are you getting the data into a SqlDataReader? A dataset??? ?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Gert Albertse" <Ge**********@discussions.microsoft.com> wrote in message news:38**********************************@microsof t.com...
If my query results are more tha one row, how do I point to the
firstrow and
the to the second row etc, to bind the data to textboxes?


Nov 19 '05 #5

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

Similar topics

13
by: Brian Quinlan | last post by:
I've decided that it would be be fun to host a weekly Python programming contest. The focus will be on algorithms that require a bit of thought to design but not much code to implement. I'm...
4
by: cameron | last post by:
I have always been under the impression that LDAP was optimized for speed. Fast queries, fast access, slower writes. I have a block of data in LDAP and in SQL. Exact same data. The query is fast...
26
by: Martin R | last post by:
Hi, How to find first not null value in column whitout chacking whole table (if there is a not null value then show me it and stop searching, the table is quite big)? thx, Martin *** Sent...
14
by: sangram.0149 | last post by:
hi, can someone plz help me on this one i need to fetch the first record from every group of records with the same emp id. i cannot use group by because i want to fetch all the fields...
3
by: aldonnelley | last post by:
Hi all. Just having a weird problem with tkinter. I'm trying to make a gui that shows results from an image search, with a "forward" and "back" button so the user can compare results from...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
6
by: zack | last post by:
This query has been driving me crazy, and would be grateful for a nudge in the right direction. Still pretty much a beginner using Access 2003, I just cannot figure the solution to the following in...
2
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
I am executing an AJAX page method that is a long running task. After starting the first method, I execute a second page method to retrieve the status of the task. It works fine in an empty web...
11
by: tokcy | last post by:
Hi everyone, I am new in php and ajax, i am facing the prob while i click on element of first drop down then in second dropdown all element showl come from database. I mean i have three dropdown 1....
3
by: jmooney5115 | last post by:
Hey. I am new to php and am trying to learn. What I'm doing is querying(did I spell this right?) a mySQL database and putting the results into a table on a webpage. I have worked for hours on this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...

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.