Author | Topic: WinDev *.fic and DBF | |
---|---|---|
Alain | WinDev *.fic and DBF on Fri, 01 Jun 2018 07:56:06 -0400 Hello everyone ! I need your ideas! I have database including file extension are * .NDX, * .FIC, * .mno I deduced that it was WinDef Databases from PcSoft. A Canadian company (Lapalys) with an app that allows you to read these comics. They can be converted to csv with a delimiter; I can convert these txt files to dbf when there is not a lot of field! My questions Is there an app that converts the Databases (.FIC) to DBF Does anyone know of a .prg allowing the import of txt, csv to dbf. The program I wrote is more like hacking! I have trouble with this type of files. I can not synchronize fields. I tried "append from delimited", Fread ... Thank you for giving me help. alain example import.prg | |
Andreas Gehrs-Pahl | Re: WinDev *.fic and DBF on Fri, 01 Jun 2018 11:05:30 -0400 Alain, >I have trouble with this type of files. I can not synchronize >fields. I tried "append from delimited", Fread ... You have several options, depending on the data and what tools are available to you. 1) If you have access to the HFSQL ODBC Driver you can use Alaska's ODBCDBE or Boris' SQLExpress to read the data directly from the HFSQL database. That way, you have access to all data values in their native format and you can even read the data relational, combining data from multiple tables/records into a single record. 2) If you have already converted the files into (some sort of) CSV format, you can either use the DELDBE or FRead() to convert that data. Just make sure that you select the option to enclose text/character values in quotes, when you export/convert the data to CSV. CSV isn't a great format for complex data, though. It can only handle basic field types (Character, Numeric, Date, Boolean/Logic) but won't work for more complex ones, like Memo Fields (Long Text) or Binary values (like images). Also, even if you choose to enclose the character values in quotes, so that any field delimiters (like comas or semicolons) in text fields won't be mistaken for real field delimiters, any quote characters, as well as many non-printable characters (like CR, LF, etc.) can still break the file. So, before you can use the DELDBE, you might need to manually "fix" the CSV file and replace any such issues, like changing extra quotes, etc. with a simple text editor. Also keep in mind that some programs add an extra field delimiter at the end of a record. If the DELDBE doesn't work for you, you can always use FRead() to manually read the text and convert it. That will allow you to handle some common issues that the DELDBE might not be able to handle by itself. If you do use the DELDBE, make sure that it is setup correctly for your CSV file format, such as the correct field and record delimiters etc. If you use FRead(), I suggest a modular approach, where you read one line (or record) at a time (with a sub-routine) and convert the resulting text into an array of individual fields, which you can then separately convert to the correct data types and save to your database. Hope that helps, BTW: I'm available for software development as well as tutoring/coaching, if you need any additional help. 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 | |
Alain | Re: WinDev *.fic and DBF on Wed, 06 Jun 2018 19:24:10 -0400 Bonsoir Andreas merci pour vos réponses jai opté pour fread et cela fonctionne très bien vos différentes réponses mon aidé à trouver une bonne solution encore merci Alain Le 01/06/2018 à 07:56, Alain a écrit : > Hello everyone ! > > I need your ideas! > > I have database including file extension > are * .NDX, * .FIC, * .mno > > I deduced that it was WinDef Databases from PcSoft. > > A Canadian company (Lapalys) with an app that allows you to read > these comics. They can be converted to csv with a delimiter; > > I can convert these txt files to dbf > when there is not a lot of field! > > My questions > > Is there an app that converts the Databases (.FIC) to DBF > Does anyone know of a .prg allowing the import of txt, csv > to dbf. The program I wrote is more like hacking! > I have trouble with this type of files. I can not synchronize > fields. I tried "append from delimited", Fread ... > > Thank you for giving me help. > > alain |