Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
  #2 (permalink)  
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.
  #3 (permalink)  
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

  #4 (permalink)  
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.:)
 


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
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



All times are GMT -4. The time now is 09:25 AM.


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