Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 August 12th, 2004, 10:37 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default textbox dataset

I am trying to display the result of my select statement in a textbox.
For example I have a select statement that will return record from 3 different column in a table. I want the result to go to the text box i know how to display it in a datagrid or mxgrid but i want my query result togo into the textbox i have 3 text box my result from the select statement will be from 3 different column and so each textbox will get the result of each column. it works fine with datagrid or mxdatagrid.

thanks.
 
Old August 12th, 2004, 11:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Please post some code to show how you are loading your data.
 
Old August 12th, 2004, 11:35 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

its a access database file

 
Old August 12th, 2004, 02:41 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

use DataReader...
Code:
SqlDataReader s=objCommand.ExecuteReader();
while(s.Read())
{
TextBox1.Text+=s.GetString(0)+"\n";
TextBox2.Text+=s.GetString(1)+"\n";
TextBox3.Text+=s.GetString(2)+"\n";

}
--------------------------------------------
Mehdi.:)




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to databind a textbox to a dataset field aven ASP.NET 2.0 Basics 1 January 26th, 2006 11:39 PM
dataset and textbox altafingar Classic ASP Databases 1 August 13th, 2004 04:27 PM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM
How to display dataset using textbox RockNRoll ASP.NET 1.0 and 1.1 Basics 1 July 4th, 2003 07:37 AM





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