SQL语句:INSERT INTO本帖最后由 JackyCracker 于 2013-03-14 09:53:39 编辑Dim s As String INSERT INT
SQL语句:INSERT INTO
本帖最后由 JackyCracker 于 2013-03-14 09:53:39 编辑
Dim s As String = "INSERT INTO userlist (用户名, 密码,用户类型,默认语言,线型1,大小1,边框颜色,填充颜色,线型2,大小2,颜色2,线型3,大小3,颜色3,线型4,大小4,颜色4,线型5,大小5,颜色5,字体6,粗体6,斜体6,下划线6,删除线6,大小6,颜色6) VALUES ('" & Trim(TextBox1.Text) & "', '" & Trim(TextBox2.Text) & "','" & Trim(ComboBox2.Text) & "','" & Trim(ComboBox3.Text) & "',"实线","1","Color [Red]","Color [A=97, R=0, G=0, B=128]","实线","2","Color [A=255, R=255, G=128, B=0]","实线","1","Color [Lime]","实线","1","Color [Yellow]","实线","2","Color [Yellow]","楷体","True","False","False","False","40","Color [Yellow]")"
显示错误是:“实线”直最后的部分有波浪线,报错前面应为语句结束,求各位大神帮我看看哪些写错符号呢?求方法求解析求帮助
[解决办法] Dim s As String = "INSERT INTO userlist (用户名, 密码,用户类型,默认语言,线型1,大小1,边框颜色,填充颜色,线型2,大小2,颜色2,线型3,大小3,颜色3,线型4,大小4,颜色4,线型5,大小5,颜色5,字体6,粗体6,斜体6,下划线6,删除线6,大小6,颜色6) VALUES ('" & Trim(TextBox1.Text) & "', '" & Trim(TextBox2.Text) & "','" & Trim(ComboBox2.Text) & "','" & Trim(ComboBox3.Text) & "','实线','1','Color [Red]','Color [A=97, R=0, G=0, B=128]','实线','2','Color [A=255, R=255, G=128, B=0]','实线','1','Color [Lime]','实线','1','Color [Yellow]','实线','2','Color [Yellow]','楷体','True','False','False','False','40','Color [Yellow]')"
把实线后的所有双引号替换成单引号
[解决办法]"实线","1","Color [Red]","Color [A=97, R=0, G=0, B=128]","实线","2","Color [A=255, R=255, G=128, B=0]","实线","1","Color [Lime]","实线","1","Color [Yellow]","实线","2","Color [Yellow]","楷体","True","False","False","False","40","Color [Yellow]"
这些双引号换成单引号