工业单据如何执行sql 语句(三种方法):
1.Set rs = SQLHelper.ExecuteSQL(strSQL, "")
2.
Private obj As New K3ClassEvents.BillEvent Set rs = obj.K3Lib.GetData(sql)
3.
rs.Open sql, m_BillTransfer.Cnnstring, 1, 1
工业单据获取最大行:
‘***************************************** ‘获取分录行数 ‘***************************************** Public Function GetEntryMax() As Long Dim k As Long Dim iFItemID As Long Dim oEntryCtl As Variant Dim maxrow As Long ‘最大行‘ For k = LBound(m_BillTransfer.EntryCtl) To UBound(m_BillTransfer.EntryCtl) If UCase(m_BillTransfer.EntryCtl(k).FieldName) = UCase("FItemID") Then ‘物料代码所在列 iFItemID = k Exit For End If Next k oEntryCtl = m_BillTransfer.EntryCtl maxrow = UBound(oEntryCtl(iFItemID).DInterID) ‘获取表体最大行 GetEntryMax = maxrow End Function
原文:http://www.cnblogs.com/swallow123/p/5327997.html