Retreiving data from database
Closed
bhargava000
Posts
1
Registration date
Thursday April 29, 2010
Status
Member
Last seen
April 29, 2010
-
Apr 29, 2010 at 06:21 AM
nithin - Apr 29, 2010 at 08:03 AM
nithin - Apr 29, 2010 at 08:03 AM
Related:
- Retreiving data from database
- Access database download - Download - Databases
- Tmobile data check - Guide
- Borland database engine download - Download - Databases
- Transfer data from one excel worksheet to another automatically - Guide
- Gta 5 data download for pc - Download - Action and adventure
1 response
Hi Bhargava here is the solution...
using System.data.sqlclient;
button1_click
1.use sqlconnection to connect to dtabase with appropriate connection strings
2.sqlcommand com=new sqlcommand("select * from emp where empid=@empid",con);
3.com.parameters.add("@empid",textbox1.text);
4.connection.open();
5.sqldatareader rdr=com.executereader();
6.while(rdr.read())
{
messagebox.show(rdr["name"].tostring());
}
7.here i used message box instead u use whatever u want.
if u want sample c#.net projects mail me to nithin8702@gmail.com
using System.data.sqlclient;
button1_click
1.use sqlconnection to connect to dtabase with appropriate connection strings
2.sqlcommand com=new sqlcommand("select * from emp where empid=@empid",con);
3.com.parameters.add("@empid",textbox1.text);
4.connection.open();
5.sqldatareader rdr=com.executereader();
6.while(rdr.read())
{
messagebox.show(rdr["name"].tostring());
}
7.here i used message box instead u use whatever u want.
if u want sample c#.net projects mail me to nithin8702@gmail.com