Dim tmpstr As String
Dim rs As New ADODB.Recordset
tmpstr = "insert into cc(id,customerid,customername,address,employeeqj,cityid,cityname) values(" & _
lblID.Caption & "," & _
TransSQLChar(txtCustomer.Text) & "," & _
TransSQLChar(txtCustomerName.Text) & "," & _
TransSQLChar(txtaddress1.Text) & "," & _
TransSQLChar(txtid.Text) & "," & _
TransSQLChar(txtcityid.Text) & "," & _
TransSQLChar(txtcityname.Text) & ""
执行时老是说该语句有问题!
Dim rs As New ADODB.Recordset
tmpstr = "insert into cc(id,customerid,customername,address,employeeqj,cityid,cityname) values(" & _
lblID.Caption & "," & _
TransSQLChar(txtCustomer.Text) & "," & _
TransSQLChar(txtCustomerName.Text) & "," & _
TransSQLChar(txtaddress1.Text) & "," & _
TransSQLChar(txtid.Text) & "," & _
TransSQLChar(txtcityid.Text) & "," & _
TransSQLChar(txtcityname.Text) & ""
执行时老是说该语句有问题!
解决方案 »
- vb的sql语句整数变量怎样表示
- 火星文是通过什么方法来替换的呢?
- 关于当前时间显示的问题?怎么才能将当前时间毫秒部分也显示出来。
- 在WEB页面上怎样使用ActiveX部件.(在线马上给分)
- 急助,Microsoft Internet control控件引用网页问题。
- VB中能否使用OLE DB编程
- 有关数据库的维护
- 关于发票打印控制、走纸的问题,我想问问,哪位帮帮忙?
- 上海、江苏的朋友关照一下 (100分)
- 谁能给我一个身份验证的代码,ADO+ACCESS!为盼,为感!
- (救命呀!)用vb自带的打包程序进行打包时,显示控件过期,怎么办?
- 在VB中用水晶报表9.2做打印,能够直接打包吗?还需要安装9.2软件吗?
Dim rs As New ADODB.Recordset
tmpstr = "insert into cc(id,customerid,customername,address,employeeqj,cityid,cityname) values(" & _
lblID.Caption & ",'" & _
TransSQLChar(txtCustomer.Text) & "','" & _
TransSQLChar(txtCustomerName.Text) & "','" & _
TransSQLChar(txtaddress1.Text) & "','" & _
TransSQLChar(txtid.Text) & "','" & _
TransSQLChar(txtcityid.Text) & "','" & _
TransSQLChar(txtcityname.Text) & "'"^_^
可是只是说”insert into 语句语法错误“
郁闷!
Dim tmpstr As String
Dim rs As New ADODB.Recordset
tmpstr = "insert into cc(id,customerid,customername,address,employeeqj,cityid,cityname) values(_
lblID.Caption & "," & _
TransSQLChar(txtCustomer.Text) & "," & _
TransSQLChar(txtCustomerName.Text) & "," & _
TransSQLChar(txtaddress1.Text) & "," & _
TransSQLChar(txtid.Text) & "," & _
TransSQLChar(txtcityid.Text) & "," & _
TransSQLChar(txtcityname.Text) & "")
tmpstr = "insert into cc(id,customerid,customername,address,employeeqj...
之后加一句
Debug.Print tmpstr
看看究竟是什么内容。