EXCEL VBA 语句出错
在下面红色那行报错,百思不得其解,请大家赐教
Private Sub CommandButton2_Click()
If TextBox2.Text <> "" And TextBox3.Text <> "" Then
Dim cn As New ADODB.Connection
Const constr = "provider=MSDAORA.oracle;data source=AAA;user id =AAA;password=AAA;"
cn.Open constr
cn.Execute "insert into vba (a,b) values ("&textbox2.Text&","&textbox3.Text&")"
MsgBox "insert ok"
cn.Close
cn = Nothing
End If
End Sub
[解决办法]
哥,分数给我吧。我没分,无法提问问题,哭~
[解决办法]
楼主真聪明!
"& 变量 &"