By the way, thanks for the answers your guys are helping me. I'm about a decade and a half before playing the VB6. I do not make windows unless forced;)
Anyway, when you do your error checking, say, among 3000 individual inserts of write requests, I learned a couple of tricks. Consider this block of code:
'----- order number 1246------- On Error Goto EH1246: sSql="insert into SalesReceiptLine ( CustomerRefListID,TemplateRe..." oConnection.Execute sSQL sSql="SELECT TxnID FROM SalesReceiptLine WHERE RefNumber='1246'..." oRecordset.Open sSQL, oConnection sTxnId = oRecordset(0) oRecordset.Close sSql="INSERT INTO SalesReceiptLine (TxnId,SalesReceiptLineDesc,Sal..." oConnection.Execute sSQL EH1246: IF Err.Number<>0 THEN sMsg = sMsg & "Order # 1246; sTxnId = " & sTxnId & _ vbCrLf & Err.Number & ": " & Err.Description & vbCrLf sErrOrders = sErrOrders & "1246," End If On Error GoTo -1 '----- order number 1247------- On Error Goto EH1247:
When you do not test Err.Number, you will receive 0: for each processed order. (maybe you donβt want it). Error On GoTo -1 resets the error so that it works again. Err seems to work only once.
I wrote a php script to build VB6 source code to run about 8000 odbc requests ...: P
source share