DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: This is not an ADO question but it is a Database Question

  1. #1
    Colin Moore Guest

    This is not an ADO question but it is a Database Question


    Hi All,

    I need to convert DBF files to an Access mdb file or a Excel xls file. I
    have done lots of database programming but I have never worked with FoxPro
    or DBase (DBF). I'll explain why I need to convert, mabye you have another
    solution.

    there is a very old system running here that collects data using a program
    that puts this data into DBF format, there is now a new system that has to
    work with the old system, the new system is programmed in RPG/400. The reason
    for that is for the security of the AS/400. The overall goal is to take
    datafrom the old system and combine it with data from the new system to create
    nice reports for the HR department. The problem is that RPG can only read
    flat files. I would export the dbf files mannually except we need this to
    happen at least once a day to generate the reports, so we are going to automate
    the program to run once a day.

    I hope I didn't confuse you, any help would be appreciated.

    Colin Moore
    IS Dept.
    Ext. 188


  2. #2
    Rohit Wason Guest

    Re: This is not an ADO question but it is a Database Question


    Colin,
    I dont see any reason you should convert from .dbf files to Excel/Access
    database and then convert into Text file (is that what you want ultimately?)

    You can directly:

    1) Load the dbf file into ADO Recordset (use a FoxPro DSN to open the dbf
    file).
    2) Convert the Recordset into Text: Recordset::GetString(Records, RowDelimiter,
    ColDelimiter etc.)
    3) Save this text to flat file and feed it to RPG/whatever...

    HTH
    Cheers,
    Rohit


    "Colin Moore" <moorecj@larsen.ns.ca> wrote:
    >
    >Hi All,
    >
    >I need to convert DBF files to an Access mdb file or a Excel xls file.

    I
    >have done lots of database programming but I have never worked with FoxPro
    >or DBase (DBF). I'll explain why I need to convert, mabye you have another
    >solution.
    >
    >there is a very old system running here that collects data using a program
    >that puts this data into DBF format, there is now a new system that has

    to
    >work with the old system, the new system is programmed in RPG/400. The

    reason
    >for that is for the security of the AS/400. The overall goal is to take
    >datafrom the old system and combine it with data from the new system to

    create
    >nice reports for the HR department. The problem is that RPG can only read
    >flat files. I would export the dbf files mannually except we need this to
    >happen at least once a day to generate the reports, so we are going to automate
    >the program to run once a day.
    >
    >I hope I didn't confuse you, any help would be appreciated.
    >
    >Colin Moore
    >IS Dept.
    >Ext. 188
    >



  3. #3
    andrew oneill Guest

    Re: This is not an ADO question but it is a Database Question


    "Colin Moore" <moorecj@larsen.ns.ca> wrote:
    >
    >Hi All,
    >
    >I need to convert DBF files to an Access mdb file or a Excel xls file.

    I
    >have done lots of database programming but I have never worked with FoxPro
    >or DBase (DBF). I'll explain why I need to convert, mabye you have another
    >solution.
    >
    >there is a very old system running here that collects data using a program
    >that puts this data into DBF format, there is now a new system that has

    to
    >work with the old system, the new system is programmed in RPG/400. The

    reason
    >for that is for the security of the AS/400. The overall goal is to take
    >datafrom the old system and combine it with data from the new system to

    create
    >nice reports for the HR department. The problem is that RPG can only read
    >flat files. I would export the dbf files mannually except we need this to
    >happen at least once a day to generate the reports, so we are going to automate
    >the program to run once a day.
    >
    >I hope I didn't confuse you, any help would be appreciated.
    >
    >Colin Moore
    >IS Dept.
    >Ext. 188


    I must be missing something here...
    If the AS400 only works with flat files and you got dbf, why do you need
    to convert the dbf to Access?

    In my innocence, I see two alternatives.
    1) Create an access database for your reporting, perhaps completely invalidating
    the fab security of the AS400. Link the dbf database to this, link the flat
    files to this and write access reports.
    2) Convert the dbf to flat files, via access or VB or whatever. Write the
    reports in RPG400.
    Precisely how and when you do what would, IMO, depend on how dynamic both
    sets of data are.

    But, I reckon I must be misunderstanding something or whatever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center