问题描述
我似乎无法弄清为什么我的执行代码无法正常工作。任何帮助表示赞赏。数据类型为int,nvarchar或一列为datetime2。我已经从Azure门户复制了连接字符串
欢呼
Sub Upload_Data()
Dim oConn As ADODB.Connection
Dim ssql As String
Set oConn = New ADODB.Connection
sqlSERVER_CONN_STRING = "Provider=sqlNCLI11;Server=tcp:myserver,1433;Initial Catalog=nzab_server;Persist Security Info=False;User ID=userid;Password=password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;"
oConn.Open sqlSERVER_CONN_STRING
oConn.Execute "INSERT INTO dbo.Database([Group],[Client],[Enterprise],[Shed],[Version_Name],[Version_Number],[Fiscal_Year],[Period],[Month],[Version_Period],[Client_Account_L1],[Client_Account_L2],[Client_Account_L3],[NZAB_Account_Group],[NZAB_Account],[Time],[Username],[Value],[Corrected_Value]) VALUES(1,1,16000101,1)"
MsgBox ("Data Uploaded")
If Not oConn Is nothing Then
If oConn.State = 1 Then oConn.Close
End If
End Sub
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)