string strtitle = this.txttitle.Text.Trim();  //为textbox 表里为varchar
            string strprice = this.txtprice.Text.Trim();  //为textbox 表里为money
            string connstr = ("database=pubs;uid=sa;pwd=;server=.;");
            SqlConnection conn = new SqlConnection(connstr);
            string comm = "insert into titles(title,price,title_id,title)   values ('"+strtitle+"','"+strprice+"',3212,3000)";
            SqlCommand command = new SqlCommand(comm,conn);
            conn.Open();
            command.ExecuteNonQuery();
            conn.Close();
                    
            this.BindToGrid();
“/rr1”应用程序中的服务器错误。
--------------------------------------------------------------------------------
不允许从数据类型 varchar 到数据类型 money 的隐性转换(表 'pubs.dbo.titles',列 'price')。请使用 CONVERT 函数来运行此查询。

 
											





 
	    


