7,762
社区成员
发帖
与我相关
我的任务
分享
'Dim conn2 As adodb.connection
' Call dbsql.Open("PROVIDER=SQLOLEDB.1;Data Source=192.168.2.113;Initial Catalog=AIS20160509094017;User Id=sa;password=lio!deshine;Persist Security info=False;") 'AIS20160720132121,sa,1!deshine
'Set conn2 = New adodb.connection
Dim AddNo As Double
Dim Addno1 As String
Dim Addno2 As String
Dim Addno3 As String
For i = 1 To 200
If m_BillTransfer.GetGridText(i, 2) = "" Then
Exit For
End If
Addno1 = m_BillTransfer.EntryCtl(8).dinterid(i)
Addno2 = m_BillTransfer.EntryCtl(2).dinterid(i)
Addno3 = m_BillTransfer.EntryCtl(36).dinterid(i)
MsgBox (Addno1)
MsgBox (Addno2)
MsgBox (Addno3)
'AddNo = ""
AddNo = "select FQty from ICInventory where FBatchNo= '" & Addno1 & "'and fitemid ='" & Addno2 & "' And fstockid ='" & Addno3 & "'"
' MsgBox (m_BillTransfer.EntryCtl(2).dinterid(i))
MsgBox (AddNo)
'm_BillTransfer.SetGridText i, 10, AddNo
'm_BillTransfer.SetGridText i, 10,(select FQty from ICInventory where FBatchNo=(m_BillTransfer.EntryCtl(8).dinterid(i)) and fitemid = (m_BillTransfer.EntryCtl(2).dinterid(i)) And fstockid = (m_BillTransfer.EntryCtl(36).dinterid(i)))
m_BillTransfer.SetGridText i, 10, 1234
Next
MsgBox ("zzz")
Dim conn2 As New adodb.connection
Call dbsql.Open("PROVIDER=SQLOLEDB.1;Data Source=192.168.2.113;Initial Catalog=AIS20160509094017;User Id=sa;password=lio!deshine;Persist Security info=False;") 'AIS20160720132121,sa,1!deshine
Or
Dim conn2 As adodb.connection
Set conn2 = New adodb.connection
Call dbsql.Open("PROVIDER=SQLOLEDB.1;Data Source=192.168.2.113;Initial Catalog=AIS20160509094017;User Id=sa;password=lio!deshine;Persist Security info=False;") 'AIS20160720132121,sa,1!deshine