vb update语句的多行写法该怎么写?
updateStr="updatemainseta1xm='"&Text1(0).Text&"',a1cym='"&Text1(2).Text&"',a1sex='"&o...
updateStr = "update main set a1xm='" & Text1(0).Text & "',a1cym='" & Text1(2).Text & "',a1sex='" & optSex & "',a1mz='" & Text1(3).Text & "',a1sfzh='" & Text1(1).Text & "',z1zzmm='" & Text1(4).Text & "',a1cjgzsj='" & DTPicker1.Value & "',a1rdsj='" & DTPicker2.Value & "',a1jtzz='" & Text1(5).Text & "',a1sjhm='" & Text1(6).Text & "',a1zzdh='" & Text1(7).Text & "',"
updateStr = updateStr & "a2byyx='" & Text2(0).Text & "',a2zhuanye='" & Text2(1).Text & "',a2zhengshuhao='" & Text2(2).Text & "',a2zgbyyx='" & Text2(5).Text & "',a2zgzhuanye='" & Text2(4).Text & "',a2zgzhengshuhao='" & Text2(3).Text & "',a2shjz='" & Text2(6).Text
updateStr = updateStr & "a3xrzc='" & Text3(0).Text & "', a3zsbh='" & Text3(1).Text & "', a3dyzc='" & Text3(2).Text & "', a3dyzsbh='" & Text3(3).Text
updateStr = updateStr & "a4xm='" & Text4(0).Text & "',a4csny='" & DTPicker3.Value & "',a4xl='" & Text4(2).Text & "',a4cym='" & Text4(2).Text & "',a4zzmm='" & Text4(3).Text & "',a4gzdw='" & Text4(4).Text & "',a4cszy='" & Text4(5).Text
updateStr = updateStr & "grjl='" & Text7.Text & "',jianli='" & Text8.Text
updateStr = updateStr & "' where id=" & jID
cnn.Execute (updateStr) 展开
updateStr = updateStr & "a2byyx='" & Text2(0).Text & "',a2zhuanye='" & Text2(1).Text & "',a2zhengshuhao='" & Text2(2).Text & "',a2zgbyyx='" & Text2(5).Text & "',a2zgzhuanye='" & Text2(4).Text & "',a2zgzhengshuhao='" & Text2(3).Text & "',a2shjz='" & Text2(6).Text
updateStr = updateStr & "a3xrzc='" & Text3(0).Text & "', a3zsbh='" & Text3(1).Text & "', a3dyzc='" & Text3(2).Text & "', a3dyzsbh='" & Text3(3).Text
updateStr = updateStr & "a4xm='" & Text4(0).Text & "',a4csny='" & DTPicker3.Value & "',a4xl='" & Text4(2).Text & "',a4cym='" & Text4(2).Text & "',a4zzmm='" & Text4(3).Text & "',a4gzdw='" & Text4(4).Text & "',a4cszy='" & Text4(5).Text
updateStr = updateStr & "grjl='" & Text7.Text & "',jianli='" & Text8.Text
updateStr = updateStr & "' where id=" & jID
cnn.Execute (updateStr) 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询