• Formatting database output (VBA/VB)

    Author
    Topic
    #380130

    I’m looking for solutions, suggestions and bright ideas. I’m producing a
    relational database system that outputs various subsets as input data for
    nine different legacy systems. The “client” systems all take ASCII text
    data, but are very picky about its format – for example, a client may expect
    a record to be split over several lines of the output file in a particular
    way, with some of the data items in quotes and some not, some separated with
    commas and some not, different items to different decimal places and so on.
    Some clients expect a separate file for each “object” in the database, while
    others expect a single file with record “headers” and “footers” to separate
    the objects. In all there are 56 formats.

    For my pilot study, I’ve used an Access database, extracted the appropriate
    data with SQL and used VBA code to format the outputs, but it’s required a
    lot of code to do nothing terribly clever and an immense amount of testing
    to check that it always does the right thing, whatever the data in the
    database.

    It seems to me that I shouldn’t have to program each format separately.
    Having extracted the right data using SQL, there should be a way of
    formatting it according to a “template”, predefined for each output format.
    (Even Word’s MailMerge would almost do this!) Can anyone suggest an
    off-the-shelf solution for this, or a more appropriate technology than the
    one I’m using, or point me in any promising directions. (BTW I also have to
    bodge the data, for example alter numbers that are outside allowable ranges,
    but I’ve already written the functions to do this, and they could be called
    by the queries if necessary, rather than as part of the “formatting”.)

    The solution needs to be _very_ robust and maintainable for years.

    Viewing 2 reply threads
    Author
    Replies
    • #635488

      I once evaluated a product called Data Junction which now appears to have spawned a whole product line. You might find that they have template for your 56 legacy sources, or that you can leverage their tools for that purpose. Or at least you can review the product to get some ideas on how to create your own “any-to-any” conversion engine.

    • #635519

      Have you looked at using Access export specifications. They may not be able to do everything you need to, but they may be able to do most of them so you would only have to write a few arcane formats instead of all 56.

    • #635726

      Since this was cross-posted in the Access forum as well, I’m going to lock this thread and ask that any further replies be posted here

    Viewing 2 reply threads
    Reply To: Formatting database output (VBA/VB)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: