With rsDummy
For intIndex = 0 To m_FieldCountTmp - 1
Select Case astrPrintFiled(intIndex)
Case "ServiceCode"
.Fields.Append "ServiceCode", adBSTR
Case "ServiceName"
.Fields.Append "ServiceName", adBSTR
Case "Number"
.Fields.Append "Number", adBSTR
Case "UnitPrice"
.Fields.Append "UnitPrice", adBSTR
Case "ServicePrice"
.Fields.Append "ServicePrice", adBSTR
Case Else
End Select
Next intIndex
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Open
.AddNew
For intIndex = 0 To m_FieldCountTmp - 1
Select Case astrPrintFiled(intIndex)
Case "ServiceCode"
For intSmallIndex = 1 To i
.Fields("ServiceCode").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "ServiceName"
For intSmallIndex = 1 To i
.Fields("ServiceName").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "Number"
For intSmallIndex = 1 To i
.Fields("Number").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "UnitPrice"
For intSmallIndex = 1 To i
.Fields("UnitPrice").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "ServicePrice"
For intSmallIndex = 1 To i
.Fields("ServicePrice").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case Else
End Select
Next intIndex
.Update
End With
为什么只有最后一条记录呀!
For intIndex = 0 To m_FieldCountTmp - 1
Select Case astrPrintFiled(intIndex)
Case "ServiceCode"
.Fields.Append "ServiceCode", adBSTR
Case "ServiceName"
.Fields.Append "ServiceName", adBSTR
Case "Number"
.Fields.Append "Number", adBSTR
Case "UnitPrice"
.Fields.Append "UnitPrice", adBSTR
Case "ServicePrice"
.Fields.Append "ServicePrice", adBSTR
Case Else
End Select
Next intIndex
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Open
.AddNew
For intIndex = 0 To m_FieldCountTmp - 1
Select Case astrPrintFiled(intIndex)
Case "ServiceCode"
For intSmallIndex = 1 To i
.Fields("ServiceCode").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "ServiceName"
For intSmallIndex = 1 To i
.Fields("ServiceName").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "Number"
For intSmallIndex = 1 To i
.Fields("Number").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "UnitPrice"
For intSmallIndex = 1 To i
.Fields("UnitPrice").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case "ServicePrice"
For intSmallIndex = 1 To i
.Fields("ServicePrice").Value = astrPrintName(intIndex)(intSmallIndex)
Next intSmallIndex
Case Else
End Select
Next intIndex
.Update
End With
为什么只有最后一条记录呀!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货