我想把库里的uid,和nicheng 中的值附给zhuceye.aspx中的用户: 和昵称:,该怎么作

解决方案 »

  1.   

    查出来放到DateTable dt
    Response.Write()
      

  2.   

    OleDbConnection sqlConnection1 = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\coca\\c#\\5-22\\Winap522\\data\\bbs.mdb");
                OleDbCommand cmd = new OleDbCommand();
                          cmd.CommandText = "SELECT * FROM recontent where con_id=5";
                cmd.CommandType = CommandType.Text;
                cmd.Connection = sqlConnection1;
               
                
                sqlConnection1.Open();
                
                OleDbDataReader myre = cmd.ExecuteReader();
                while (myre.Read())
                { textBox2.Text = myre["uid"].ToString();
                textBox1.Text = myre["nicheng"].ToString();
                }
                
                sqlConnection1.Close();
      

  3.   

    晕,怎么又有SQL,又的OLEDB的