string strconn ="server=192.168.1.55;database=testData;uid=sa;pwd=123456";
System.Data.SqlClient.SqlConnection Conn = new System.Data.SqlClient.SqlConnection(strconn);
Conn.Open();
string sSQL = "select name,clz from jlb";
System.Data.SqlClient.SqlDataAdapter Sda = new System.Data.SqlClient.SqlDataAdapter(sSQL,Conn);
Conn.Close();
System.Data.DataSet ds = new DataSet();
Sda.Fill(ds,"test");
string str = ds.Tables["test"].Rows[0][1].ToString();
string[] arr = new string[20];
string tes = "|";
char[] spl = tes.ToCharArray();
arr = str.Split(spl,20);
this.dataGrid1.SetDataBinding(ds,"test");
System.Data.SqlClient.SqlConnection Conn = new System.Data.SqlClient.SqlConnection(strconn);
Conn.Open();
string sSQL = "select name,clz from jlb";
System.Data.SqlClient.SqlDataAdapter Sda = new System.Data.SqlClient.SqlDataAdapter(sSQL,Conn);
Conn.Close();
System.Data.DataSet ds = new DataSet();
Sda.Fill(ds,"test");
string str = ds.Tables["test"].Rows[0][1].ToString();
string[] arr = new string[20];
string tes = "|";
char[] spl = tes.ToCharArray();
arr = str.Split(spl,20);
this.dataGrid1.SetDataBinding(ds,"test");