Author | Topic: DbExport() | |
---|---|---|
Don Keating | DbExport() on Sat, 04 Mar 2017 16:06:31 -0500 This code has been working as it should for many years. ===== Now for the real data if !tdopendbf("COA","COA") ; return ; endif COA->(ordlistadd("COA","NUMBER")) if lNOTES COA->(dbseek("650")) ; COA->(dbrlock()) tdpopmemo(10,60,fieldwblock("NOTES","COA"),,"Enter/Edit the notes") COA->(dbrunlock()) endif COA->(dbclearindex()) while .T. Create unique names for temporary files cTMPCOA:= "_"+ tdstrnum(tdrandom(9999)) if !fexists(cDATAPATH+ cTMPCOA+ ".DBF") .and. ; !fexists(cDATAPATH+ cTMPCOA+ ".FPT") .and. ; !fexists(cDATAPATH+ cTMPCOA+ ".CDX") exit endif end COA->(dbexport(cDATAPATH+ cTMPCOA)) THIS IS LINE 218. Someone please tell me why it now gives thise error. -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ERROR LOG of "C:\Work\OptiDist\Version 5\OPTIDIST.exe" Date: 03/04/2017 15:52:35 5.06.08 District 22 Xbase++ version : Xbase++ (R) Version 1.90.355 Operating system : Windows 8 06.02 Build 09200 ------------------------------------------------------------------------------ oError:args : -> VALTYPE: N VALUE: 13 -> VALTYPE: U VALUE: NIL Thread Number : 4 oError:canDefault : Y oError:canRetry : N oError:canSubstitute: N oError:cargo : NIL oError:description : Invalid data type for database field oError:filename : oError:genCode : 62 oError:operation : FIELDPUT oError:osCode : 0 oError:severity : 2 oError:subCode : 8028 oError:subSystem : BASE oError:thread : 4 oError:tries : 0 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Called from DBEXPORTRECORD(321) Called from (B)DBEXPORT(285) Called from DBEXPORT(285) Called from PRINTIT(218) Called from (B)ANNUALCRD(133) Called from TDCPSHBTN:HANDLEEVENT(413) Called from ANNUALCRD(149) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Thanks, >don< | |
Andreas Gehrs-Pahl | Re: DbExport() on Sat, 04 Mar 2017 18:05:42 -0500 Don, >oError:args : > -> VALTYPE: N VALUE: 13 > -> VALTYPE: U VALUE: NIL >oError:description : Invalid data type for database field >Called from DBEXPORTRECORD(321) If you look at the source code in DbExportRecord() -- specifically Line 321 in file "..\Source\Sys\DbBulk.prg", you will see this: FieldPut( i, aTarget[i] ) This means that Field number 13 ("i" is 13) in your database contains the value NIL ("aTarget[i]" contains NIL), which is (apparently) not supported by the selected DBE configuration. Without the actual database files and your (active) DBE settings, I won't be able to be give any advise on solving the issue, though. Hope that helps anyway. Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC | |
Don Keating | Re: DbExport() on Sat, 04 Mar 2017 20:18:15 -0500 Thanks Andreas, That gave me enough to fix the DBF/FPT files. I had suspected the problem was in the MEMO field of record 13. You confirmed that. Since there wasn't anything important in any MEMO field I removed it then added it back. Don't know how that NIL value got in there in the first place. It seems to be working now. AGAIN, THANK YOU! >don< On Sat, 04 Mar 2017 18:05:42 -0500, Andreas Gehrs-Pahl wrote: >Don, > >>oError:args : >> -> VALTYPE: N VALUE: 13 >> -> VALTYPE: U VALUE: NIL >>oError:description : Invalid data type for database field >>Called from DBEXPORTRECORD(321) > >If you look at the source code in DbExportRecord() -- specifically Line 321 >in file "..\Source\Sys\DbBulk.prg", you will see this: > >FieldPut( i, aTarget[i] ) > >This means that Field number 13 ("i" is 13) in your database contains the >value NIL ("aTarget[i]" contains NIL), which is (apparently) not supported >by the selected DBE configuration. > >Without the actual database files and your (active) DBE settings, I won't be >able to be give any advise on solving the issue, though. > >Hope that helps anyway. > >Andreas |