有下面一行代码后续还有往里面加,但因一行太长写不下了,问问怎样换行
ps:空格+下划线和 %+空格+下划线都试过了,但还是不行啊。
Set AdoRs =Cnn.Execute("insert into Data(Code1,Code2,Code3,Code4,Code5,Code6,Code7,Code8,Code9,Code10,Code11,Code12,Code13,Code14,Code15,Code16,Code17,Code18,Code19,Code20,Code21,Code22,Code24,Code25,Code26,Code27,Code28,Code29,Code30,Code31,Code32,Code33,Code34,Code35,Code36,Code37,Code38,Code39,Code40) values('" & Text1(1) & "','" & Text1(2) & "','" & Text1(3) & "','" & Text1(4) & "','" & Text1(5) & "','" & Text1(6) & "','" & Text1(7) & "','" & Text1(8) & "','" & Text1(9) & "','" & Text1(10) & "','" & Text1(11) & "','" & Text1(12) & "','" & Text1(13) & "','" & Text1(14) & "','" & Text1(15) & "','" & Text1(16) & "','" & Text1(17) & "','" & Text1(18) & "','" & Text1(19) & "','" & Text1(20) & "','" & Text1(21) & "','" & Text1(22) & "','" & Text1(23) & "','" & Text1(24) & "','" & Text1(25) & "','" & Text1(26) & "','" & Text1(27) & "','" & Text1(28) & "','" & Text1(29) & "','" & Text1(30) & "','" & Text1(31) & "','" & Text1(32) & "','" & Text1(33) & "'," & Text1(34) & "','" & Text1(35) & "','" & Text1(36) & "','" & Text1(37) & "','" & Text1(38) & "','" & Text1(39) & "','" & Text1(40) & "')")
ps:空格+下划线和 %+空格+下划线都试过了,但还是不行啊。
Set AdoRs =Cnn.Execute("insert into Data(Code1,Code2,Code3,Code4,Code5,Code6,Code7,Code8,Code9,Code10,Code11,Code12,Code13,Code14,Code15,Code16,Code17,Code18,Code19,Code20,Code21,Code22,Code24,Code25,Code26,Code27,Code28,Code29,Code30,Code31,Code32,Code33,Code34,Code35,Code36,Code37,Code38,Code39,Code40) values('" & Text1(1) & "','" & Text1(2) & "','" & Text1(3) & "','" & Text1(4) & "','" & Text1(5) & "','" & Text1(6) & "','" & Text1(7) & "','" & Text1(8) & "','" & Text1(9) & "','" & Text1(10) & "','" & Text1(11) & "','" & Text1(12) & "','" & Text1(13) & "','" & Text1(14) & "','" & Text1(15) & "','" & Text1(16) & "','" & Text1(17) & "','" & Text1(18) & "','" & Text1(19) & "','" & Text1(20) & "','" & Text1(21) & "','" & Text1(22) & "','" & Text1(23) & "','" & Text1(24) & "','" & Text1(25) & "','" & Text1(26) & "','" & Text1(27) & "','" & Text1(28) & "','" & Text1(29) & "','" & Text1(30) & "','" & Text1(31) & "','" & Text1(32) & "','" & Text1(33) & "'," & Text1(34) & "','" & Text1(35) & "','" & Text1(36) & "','" & Text1(37) & "','" & Text1(38) & "','" & Text1(39) & "','" & Text1(40) & "')")
解决方案 »
- 请vb高手帮忙
- 谁能给我举个ScriptLet控件的例子 网上资料太少了
- activeSkin4.3 换肤控件的示例程序,我往窗体中加其他任何控件为何都不能被换肤?
- 请教高手!在线等待,下面的错误原因是??? 我想了3天了!!! Set rs3 = db.OpenRecordset(sql, dbOpenDynaset)“参数不足,期待是1”
- 由绿变红,进者有分
- 如何在程序调用access数据库时,跟踪程序中运行的sql 语句,急!!!!(
- 请大家帮忙看看这段关于msflexgrid的代码
- 没人能帮助我吗?
- set有什么作用,他怎样用。谢谢
- <电脑编程技巧与维护>,程序员自己的读物! 邮发代号82-715
- ado怎么连接多个数据库?
- VB checkbox的使用问题
"hahah"
strP="hahaha" _
& "hahah"
s=Text1(1) & "','" & Text1(2) & "','" & Text1(3) & "','" & Text1(4) & "','" & Text1(5) & "','" & Text1(6) & "','" & Text1(7) & "','" & Text1(8) & "','" & Text1(9) & "','" & Text1(10) & "','" & Text1(11) & "','" & Text1(12) & "','" & Text1(13) & "','" & Text1(14) & "','" & Text1(15) & "','" & Text1(16) & "','" & Text1(17) & "','" & Text1(18) & "','" & Text1(19) & "','" & Text1(20) & "','" & Text1(21) & "','" & Text1(22) & "','" & Text1(23) & "','" & Text1(24) & "','" & Text1(25) & "','" & Text1(26) & "','" & Text1(27) & "','" & Text1(28) & "','" & Text1(29) & "','" & Text1(30) & "','" & Text1(31) & "','" & Text1(32) & "','" & Text1(33) & "'," & Text1(34) & "','" & Text1(35) & "','" & Text1(36) & "','" & Text1(37) & "','" & Text1(38) & "','" & Text1(39) & "','" & Text1(40) & "')"如果用 s="x" & _最多只能三十几行貌似,可以转换成
s="xx"
s=s & "xxx"这样的形式。其实对于你上面的text1控件数组完全可以用一个循环搞定。dim i%,s$
for i=1 to 40
s=s & text1(i).text & "','"
nextmsgbox s
看看s内容,然后加上前后缀组成即可。
Dim sSql As String
sSql = "update baby_yq set "
sSql = sSql & "概况 = '" & sGH
sSql = sSql & "',身体变化 = '" & sBody
sSql = sSql & "',子宫中的胎儿 = '" & sBaby
sSql = sSql & "',营养与饮食 = '" & sEat
sSql = sSql & "',专家指导 = '" & sZJ
sSql = sSql & "',特别提醒 = '" & sWarn
sSql = sSql & "',胎教 = '" & sTJ
sSql = sSql & "',生活保健 = '" & sLife
sSql = sSql & "',心理调适 = '" & sHeart & "'"
sSql = sSql & " "