Author | Topic: Foxpro and Xbase | |
---|---|---|
Alain R | Foxpro and Xbase on Wed, 22 Apr 2015 17:08:53 +0200 Hello I have a insolving problem with FoxProx et Xbase with index file I'm working in Clipper, dbase and Xbase. At office, we use a program from Headquater and It's writing in FoxPro ! With a program write in Xbase, I would like use DBF FOXPRO without use the index files created by FoxPro. It's works fine since 2 years but we have a new program from main office. Now I have a problem of indexing. When I create a new index ( with DbeSetDefault( "FOXCDX" ) ) i have a problem with a field named clenunik_1 ( it's structure is character) my coding : DbeSetDefault( "FOXCDX" ) icibleB := w_rep_tempo + "clefunik.cdx" delete FILE (icibleB) do init_p OrdCreate(iCibleB,,"upper(clenunik_1)",{||prog_p(upper(clenunik_1))}) ( VERSION 1) do end_p OrdCreate(iCibleB,,"clenunik_1",{||prog_p(clenunik_1)}) ( VERSION 2) The indexation works because the windows progression show the status (oProgr := ProgressBar():new(oFCrt,,{950,030},{15,650},,.f.)) but when te program must close the index files, it crashes When I use version 1 with UPPER : ------------------------------------------------------------------------------ Log Erreur de "Gestion CE.EXE" Date: 22/04/2015 16:58:23 Xbase++ version : Xbase++ (R) Version 1.90.331 SystSme d'op,raton : Windows XP 05.01 Build 02600 Service Pack 3 ------------------------------------------------------------------------------ oError:args : -> VALTYPE: U VALUE: NIL oError:canDefault : N oError:canRetry : N oError:canSubstitute: Y oError:cargo : NIL oError:description : Parameter has a wrong data type oError:filename : oError:genCode : 2 oError:operation : upper oError:osCode : 0 oError:severity : 2 oError:subCode : 1025 oError:subSystem : BASE oError:thread : 1 oError:tries : 0 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Appel par (B)FACTURATION(0) Appel par FACTURATION(265) Appel par (B)MAIN(453) Appel par MAIN(498) When a use version 2 without UPPER : ------------------------------------------------------------------------------ Log Erreur de "Gestion CE.EXE" Date: 22/04/2015 17:01:27 Xbase++ version : Xbase++ (R) Version 1.90.331 SystSme d'op,raton : Windows XP 05.01 Build 02600 Service Pack 3 ------------------------------------------------------------------------------ oError:args : -> VALTYPE: C VALUE: F:\bdce\data\clefunik.cdx -> VALTYPE: U VALUE: NIL -> VALTYPE: C VALUE: clenunik_1 -> VALTYPE: B VALUE: {||prog_p(clenunik_1)} -> VALTYPE: L VALUE: Y -> VALTYPE: L VALUE: Y oError:canDefault : Y oError:canRetry : Y oError:canSubstitute: N oError:cargo : NIL oError:description : oError:filename : oError:genCode : 8999 oError:operation : OrdCreate oError:osCode : 0 oError:severity : 2 oError:subCode : 0 oError:subSystem : BASE oError:thread : 1 oError:tries : 1 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Appel par FACTURATION(266) Appel par (B)MAIN(453) Appel par MAIN(498) Thanks for your ideas and sorry for my bad english alain | |
on | ||
on | ||
on | ||
Andreas Gehrs-Pahl | Re: Foxpro and Xbase on Sat, 25 Apr 2015 13:12:32 -0400 Alain, Posting PDF files instead of text/program files is a bad idea, as it unnecessarily increases the length of the post, and makes it much more complicated to extract any of the information from those files. To answer your main question -- as Peter Alderliesten already did in the GUI newsgroup -- just add the following command to your code, before you open the database: "Set NullValue Off". You can place that line into the DbeSys() procedure if you want, as you probably want this to be the default behavior for all your databases. I have attached a small demo program, based on your two PDF files that shows that this will work. Just remark out the "NullValue" line in the DbeSys() procedure, and you will get the same error(s) as you reported. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas.GP@Charter.net web: http://www.Aerospace-History.net Fox_Null.zip | |
Alain R | Re: Foxpro and Xbase on Thu, 30 Apr 2015 11:43:49 +0200 Hi Thomas Thanks to your answer I have simply add "Set NullValue Off" in my dbesys.prg and now that's work perfectly thank you very much Bye Alain "Andreas Gehrs-Pahl" a écrit dans le message de groupe de discussion : 1ja37ra6gimu7$.1rh004hujez1q$.dlg@40tude.net... > Alain, > > Posting PDF files instead of text/program files is a bad idea, as it > unnecessarily increases the length of the post, and makes it much more > complicated to extract any of the information from those files. > > To answer your main question -- as Peter Alderliesten already did in the > GUI > newsgroup -- just add the following command to your code, before you open > the database: "Set NullValue Off". You can place that line into the > DbeSys() > procedure if you want, as you probably want this to be the default > behavior > for all your databases. > > I have attached a small demo program, based on your two PDF files that > shows > that this will work. Just remark out the "NullValue" line in the DbeSys() > procedure, and you will get the same error(s) as you reported. > > Hope that helps, > > Andreas > -- > Andreas Gehrs-Pahl > Absolute Software, LLC > > phone: (989) 723-9927 > email: Andreas.GP@Charter.net > web: http://www.Aerospace-History.net |