get a single record from dataset to display in label

G

Guest

Hi..

I need to diplay a single record from mysqldb..'
i just create the dataset...

-----------------------
myConnectionString = "Database=altia;Data Source=development;User
Id=root;Password=citranet";
string mySelectQuery = "select * from tbluser where (txtUserName = '" +
TextBox1.Text + "')";
MySqlConnection myConnection = new MySqlConnection(myConnectionString);
MySqlDataAdapter myrecord = new MySqlDataAdapter(mySelectQuery,myConnection);
myConnection.Open();
ds = new DataSet();

ds.Tables.Add("tbluser");
logaccess = myrecord.Fill(ds,"tbluser").ToString();
//i try this but it return 1 as it is a single
record
Label1.Text = //this is the place that i need the data to display
myConnection.Close();

Please help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top