473,809 Members | 2,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying values in multiple textboxes using a single SQL Command

1 New Member
I've a html table in my web form which contains 30 rows of textboxes. I want to display all the textbox values by using a search command...Pleas e help me...
Apr 23 '12 #1
1 3181
adriancs
122 New Member
I assume that you using MySql.
Expand|Select|Wrap|Line Numbers
  1. MySqlConnection myconn = new MySqlConnection(connectionString);
  2. string sql = "select * from table1;";
  3. DataTable dt = new DataTable();
  4. myconn.Open();
  5. MySqlDataAdapter da = new MySqlDataAdapter(sql, myconn[);
  6. da.Fill(dt);
  7. myconn.Close();
  8. textBox1.Text = dt.Rows[0]["column1"] + "";
  9. textBox2.Text = dt.Rows[0]["column2"] + "";
  10. ....
  11. ....
  12. textBox30.Text = dt.Rows[0]["column30"] + "";
Apr 24 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
4104
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
8
3574
by: DB2 Novice | last post by:
I am trying to use DB2 Control Centre (version 8.2) to load one flat file into multiple tables. However, I don't see the options in Control Centre that allows that. Anyone knows how to do this? DB2 Novice
1
2505
by: arthy | last post by:
Hi, Is it possible to execute multiple statements on to the database using a single dbconnection object.what is the drawback in using .If not possible ,then how can the execution of multiple statements using a single object be done. thanks in advance, arthy
0
908
by: JJ | last post by:
Hi, Can anyone kindly tell if I can convert multiple Visual Studio 2003 solutions to VS 2005 format in a single command? -- JJ
1
8422
by: Sirisha | last post by:
Hi, I want javascript for displaying multiple textboxes dynamically. ADD-this is button. if i click button first time it will display 1 textbox and if i click 2nd time it will display another textbox,if i click that button once again display another textbox.if i click 10 times it will display 10 textboxes. so i want code for displaying textboxes dynamically using javascript.
10
13107
by: shankhar | last post by:
Hi all, In my project there is a requirement. If a user logged in at a time since he/she logged out others are not allowed to loggin using the same user name. That is to avoid multiple logins using a account. How to do this? I had got a idea and implemented. 1. When a user logs in storing the username, ip, login time to db.
3
1217
by: gurpreetintown | last post by:
One button is required on the main page to print 5 reports associated with 5 different report viewer controls on different forms.
0
2053
by: teckguan | last post by:
Hi everyone, I would like to ask how am I going to execute multiple scripts using UNIX command? I have found a command to execute. However, I cannot execute it. The command is db2 -txf <<EOF $SQLSTMTset schema ADMIN; I do think that maybe the author types wrongly. I hope you guys can help. Thanks.
0
3141
debasisdas
by: debasisdas | last post by:
Using Merge command (supported version 9 onwards) ======================================== Used to go for insert/update in a single command based on some condition. Example #1 merge into emp5 e using (select empno,ename from emp) e1 on (e.empno=e1.empno)
3
2316
by: marsh44 | last post by:
I am using a multiple filters to search for specific criteria. In one of the filters criteria, I need to use the OR instead of the AND as illustrated below. When insterting the OR it will not recognize the other criteria. If Not IsNull(Me.cboState) Then strWhere = strWhere & "( = """ & Me.cboState & """) AND " End If If Not IsNull(Me.cboSurvey1) Then strWhere = strWhere & "( = """ & Me.cboSurvey1 & """)...
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10378
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10121
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.