| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3591 人关注过本帖
标题:错误 3 运算符“+”无法应用于“string”类型的操作数
取消只看楼主 加入收藏
V小v
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-2-13
结帖率:0
收藏
已结贴  问题点数:20 回复次数:0 
错误 3 运算符“+”无法应用于“string”类型的操作数
int index_1 = listBox1.Text.IndexOf(":");//获取 :所在位置
                        string id_1 = listBox1.Text.Substring(0, index_1);
                        //int ic = Int32.Parse(id_1);
                        int index = comboBox1.Text.IndexOf("-->");//获取字符串中-->所在位置获取分类的id
                        string id = comboBox1.Text.Substring(0, index);//只获取-->之前的字符
                        string sql = "UPDATE linshiyizhu SET 住院号=" + textBox1.Text + ",姓名='" + textBox2.Text + "',性别='" + textBox3.Text + "',年龄=" + textBox4.Text + ",科室='" + textBox5.Text + "','药名='" + textBox7.Text + "',数量=" + textBox8.Text + ",每次用量=" + textBox10.Text + ",频次='" + textBox11.Text + "',用法='" + textBox9.Text + "',备注='" + textBox12.Text + "',cid=" + textBox6.Text + " WHERE 住院号" = +id_1;
2016-02-13 16:51
快速回复:错误 3 运算符“+”无法应用于“string”类型的操作数
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014347 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved