在sql数据库中:
数据库名:sq_ha315a
表名:shop
shop表里的需要用到的字段:Expr4,vclassname在mysql数据库中:
数据库名:phpwind
表名:pw_threads
pw_threads表里的需要用到的字段:author,bigType两张表的关系shop.Expr4=pw_threads.author要求:根据(shop.Expr4=pw_threads.author)将shop.vclassname
      的值更新到pw_threads.bigType
我做了如下测试,报错如下:错误
当前上下文中不存在名称“Expr41”
当前上下文中不存在名称“vclassname1”
请高手帮我看看!      
        SqlCommand com;
        SqlDataReader dr;
        SqlConnection myconn = new SqlConnection("Data Source=localhost;" + "Initial Catalog=sq_ha315a;" + "User ID=sa;Pwd=wawy593580393");
        myconn.Open();
        com = new SqlCommand("select Expr4,vclassname from shop", myconn);
        dr = com.ExecuteReader();
        while (dr.Read())
        {
            Expr41 = dr["Expr4"].ToString();
            vclassname1 = dr["vclassname"].ToString();
        MySqlConnection sqlconn = new MySqlConnection("Data Source=localhost;" + "Initial Catalog=phpwind;" + "User ID=root;Pwd=");
        sqlconn.Open();
        string sql = string.Format("update pw_threads set bigType=vclassname where Expr4=Expr4");
        MySqlCommand sqlcom = new MySqlCommand(sql, sqlconn);
        sqlcom.ExecuteNonQuery();
        sqlconn.Close();
        }