473,386 Members | 1,766 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,386 software developers and data experts.

how to assign select statement value to text box

ramanan ram
Expand|Select|Wrap|Line Numbers
  1. string sid;
  2. if (Request.QueryString["empid"] != null)
  3. {
  4.     sid = Request.QueryString["empid"];
  5.     OleDbConnection conn1 = new OleDbConnection(conn);
  6.     String sql = string.Format("SELECT * FROM ADDRESS WHERE EMPID = {0}", sid);
  7.     conn1.Open();
  8. }
  9.  
the above coding empid value getting from previous page .this field primary key in the table for example:the empid value is 4 assign to sid .based on using select statement to get the single row ,this stage address table have 4 fields each value want to show the textbox.
plz give the solution
Mar 27 '12 #1
1 3101
Frinavale
9,735 Expert Mod 8TB
Check out this article for a quick overview of how to use a DataReader to retrieve the data from your database and display it:

How To Use A Database In Your Program

-Frinny
Mar 28 '12 #2

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

Similar topics

18
by: war_wheelan | last post by:
I am very new to Transact-SQL programming and don't have a programming background and was hoping that someone could point me in the right direction. I have a SELECT statement SELECT FIXID,...
2
by: Steve Wright | last post by:
Hi all, I suspect that I will need Javascript to make this work which is why I am asking the question here! (and also crossposting) Can someone tell me if it is possible to have an HTML select...
3
by: kscdavefl | last post by:
I am using the following select statement in a web app where I take the cvalue in a text box and conduct a search of the database. "Select wo18 from workorder where wo9 = " + "'" +...
0
by: cyberbless | last post by:
I would like to dynamically assign a Select Statment to a a SqlDataSource. Problem is the SqlDataSource.Select() Command requires a "dataSourceSelectArgument" as one of its arguments. 1. What...
2
by: SFM | last post by:
I just want a simple datareader, that i can read the value returned from a select statement executed on a SQL server 2005 db. The code below should work in, but email= rdr.ToString(); when i...
2
by: Gary Dale | last post by:
I have a form with a pull-down list with six options, each of which has a value set. The value is the e-mail account name (without the domain) of a group while the displayed value is the full name...
0
Plater
by: Plater | last post by:
I found a few topics on this but nothing that solved my problem. I have a table lets call P (as an example) P has the following usefull fields:...
8
by: Mehbs | last post by:
I created a very simple form. There are 2 text boxes; 1 for entering account number and other to display its desription. I also placed buttom so when it is clicked, select statement underneath...
25
by: ramprat | last post by:
Hi All, I'm essentially trying to extract a value from the pre_05_growth_factor column of my traffic table and assign it to a variable to be used later. Does anyone know why the code below...
1
kirubagari
by: kirubagari | last post by:
My form displays a combo box populated by a SQL SELECT statement. The user will select a row from the combo box. I then want the value in a field of the row selected in the combo box to be used...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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,...

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.