I use a SQL query and store the result into a datatable and now I want to write a specific cell data in to a string or char.
Below is the code I want to get the data from row[0]
column[1]
da = new SqlDataAdapter("SELECT * FROM SeatsDetails WHERE ServiceNo='"+srno+"' AND Date='"+date+"'", con);
dt = new DataTable();
da.Fill(dt);
String t1 = (String) dt.Rows[0][1];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…