Marvin kakuru

Marvin kakuru

  • 1.4k
  • 359
  • 160.8k

View data selected in textboxes

Jul 16 2011 2:20 PM
Hi all i am trying view various rows in a database table on various textboxes. below is the code im using

SqlConnection
string
SqlCommand
cn.Open();

string
textBox3.Text = s1.ToString();

textBox4.Text = s1.ToString();
textbox3 to view day and textbox4 to view date
any help will be highly apprieciated.
thanks


s1 = cmd.ExecuteScalar().ToString();
cmd = new SqlCommand(sql, cn);
sql = ("select day,date from Herdregistar where UIC like '%" + textBox1.Text + "%'");
cn = new SqlConnection("Data Source=KATOTO-PC;Initial Catalog =thyfarm;User ID=sa;Password=Kyozi");

Answers (2)