i am new i vb.net. i am working in .net concern i want to fetch datas from sql i gave the coind as below
Expand|Select|Wrap|Line Numbers
- SqlConnection connection;
- connection = new SqlConnection();
- connection.ConnectionString = "Persist Security Info=False;" +
- "Integrated Security=SSPI;database=northwind;" +
- "server=localhost;Connect Timeout=30";
- connection.Open();
- SqlDataAdapter dataadapter;
- dataadapter = new SqlDataAdapter("select * from employee", connection);
- DataSet ds;
- ds = new DataSet();
- dataadapter.Fill(ds, "table1");
- //dataGrid1.DataSource = dataset;
- //so once ur dataset is filled then from that pick one value
- //textbox1.text = dataset.tables("table1").columns("colname")
- TextBox1.text = ds.Tables[0].Columns[0][1].ToString();
- TextBox2.text = ds.Tables[0].Columns[0][1].ToString();
TextBox1.text = ds.Tables[0].Columns[0][1].ToString();
TextBox2.text = ds.Tables[0].Columns[0][1].ToString();
as
'System.Web.UI.WebControls.TextBox' does not contain a definition for 'text'
can u clear that error and send me the correct source
and i want to know what is "table1" in
dataadapter.Fill(ds, "table1");
is it the table name...
please clear my doubts as soon as possible
regards