Query data to a database

Posted by Jopito under ASP.NET on 11/18/2013 | Points: 10 | Views : 1354 | Status : [Member] | Replies : 2
Hi pals,i have records which i need them to appear on a radgrid after button click.This is how i intend to do,when one enters information like username,Title,Age,this data will be queried from db and be represented in a radgrid,someone give me a clue on how i can do this .Thanks

Mark as answer if satisfied


Responses

Posted by: vishalneeraj-24503 on: 11/18/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
First insert data using insert statement like this
insert into tbl(username,title,Age) values('"& txt_user_name.text &"','"& txt_title.text &"','"& txt_age.text &"');

int row_affected = cmd.executenonquery();

if(row_affected>0)
use select statement to fetch data from table like this
select username,title,Age from tbl where status = 'AA';
redgrid.datasource = dataset;
redgrid.databind();

hope this helps you.


Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jopito on: 11/18/2013 [Member] Starter | Points: 25

Up
0
Down
Thank s much ,al try this

Mark as answer if satisfied

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response