Sei sulla pagina 1di 2

'----------------------------------------------------------------------' dbXfer.Format.SetDateFormat '----------------------------------------------------------------------'cwbdtDateFmtJulian 0 'cwbdtDateFmtMonDayYr 1 'cwbdtDateFmtDayMonYr 2 'cwbdtDateFmtYrMonDay 3 'cwbdtDateFmtUSA 4 'cwbdtDateFmtISO 5 'cwbdtDateFmtEUR 6 'cwbdtDateFmtJIS 7 '----------------------------------------------------------------------' dbXfer.pcFile.

FileType '----------------------------------------------------------------------'cwbdtFileTypeNotSet 0 'cwbdtASCIIText 1 'cwbdtDosRandom 2 'cwbdtBasicSequential 3 'cwbdtBasicRandom 4 'cwbdtDIF 5 'cwbdtNoConversion 6 'cwbdtDosRandomType2 8 'cwbdtBIFF4 9 'cwbdtBIFF3 10 'cwbdtBIFF5 11 'cwbdtCSV 12 'cwbdtWK4 13 'cwbdtTabDelimitedText 14 'cwbdtBIFF7 15 'cwbdtBIFF8 16 'cwbdt123 17 'cwbdt123v9 19 'cwbdtHTML 100 '---------------------------------------------------------------------------------------------------------'SetUploadCreationInfo createOption, memberText, fileText ,objectAuthority, crea teBasedOnFile, recordLength '---------------------------------------------------------------------------------------------------------'cwbdtCreateMember 0 'cwbdtCreateFileAndMember 1 'cwbdtReplaceMember 2 'cwbdtAppendToMember 3 '-------------------------'cwbdtObjAuthReadWrite 0 'cwbdtObjAuthReadOnly 1 'cwbdtObjAuthAll 2 'cwbdtObjAuthNone 3 Set tr = dt.TransferResults tr.CompletionTime tr.RowsTransferred tr.TablesTransferred

tr.DataErrorsOccurred tr.DataWarningsOccurred tr.DataErrors.Count For Each dataerr In tr.DataErrors MsgBox "Error Type = " & dataerr.ErrorType & vbCr & _ "Error Row = " & dataerr.Row & vbCr & _ "Error Column = " & dataerr.Column Next ' Declare variables Dim systemNames As New cwbx.systemNames Dim as400 As New cwbx.AS400System Dim dlr As New cwbx.DatabaseDownloadRequest Dim asciiOpts As cwbx.DatabaseDownloadASCIIOptions ' Retrieve the default server and use it to initialize the AS400System ' object as400.Define systemNames.DefaultSystem ' Set the System property of the download request object Set dlr.System = as400 ' Set the server file name for the transfer dlr.AS400File = "qiws/qcustcdt" ' Set the name of the PC file dlr.pcFile.Name = "c:\qcustcdt.txt" ' Obtain access to the ASCII download options Set asciiOpts = dlr.pcFile.Options ' Do not append an End of File marker to the file asciiOpts.AppendEOFIndicator = False ' Include leading zeros, instead of spaces, for numeric values asciiOpts.IncludeLeadingZeros = True ' Do not truncate trailing spaces from the end of rows asciiOpts.TruncateSpaces = False ' Download the data dlr.Download

Potrebbero piacerti anche