Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 77213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:47:42+00:00 2026-05-10T20:47:42+00:00

Essentially, I have to get a flat file into a database. The flat files

  • 0

Essentially, I have to get a flat file into a database. The flat files come in with the first two characters on each line indicating which type of record it is.

Do I create a class for each record type with properties matching the fields in the record? Should I just use arrays?

I want to load the data into some sort of data structure before saving it in the database so that I can use unit tests to verify that the data was loaded correctly.

Here’s a sample of what I have to work with (BAI2 bank statements):

01,121000358,CLIENT,050312,0213,1,80,1,2/  02,CLIENT-STANDARD,BOFAGB22,1,050311,2359,,/  03,600812345678,GBP,fab1,111319005,,V,050314,0000/  88,fab2,113781251,,V,050315,0000,fab3,113781251,,V,050316,0000/  88,fab4,113781251,,V,050317,0000,fab5,113781251,,V,050318,0000/  88,010,0,,,015,0,,,045,0,,,100,302982205,,,400,302982205,,/  16,169,57626223,V,050311,0000,102 0101857345,/  88,LLOYDS TSB BANK PL 779300 99129797  88,TRF/REF 6008ABS12300015439  88,102 0101857345 K BANK GIRO CREDIT  88,/IVD-11 MAR  49,1778372829,90/  98,1778372839,1,91/  99,1778372839,1,92 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:47:43+00:00Added an answer on May 10, 2026 at 8:47 pm

    I’d recommend creating classes (or structs, or what-ever value type your language supports), as

    record.ClientReference 

    is so much more descriptive than

    record[0] 

    and, if you’re using the (wonderful!) FileHelpers Library, then your terms are pretty much dictated for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There is no class in the Outlook Object Model that… May 11, 2026 at 10:48 am
  • added an answer I think the solution to this question will help you:… May 11, 2026 at 10:48 am
  • added an answer You can use the DateTime CPAN module. eg. my $dt… May 11, 2026 at 10:48 am

Related Questions

Essentially, I have to get a flat file into a database. The flat files
I am currently trying to manipulate a unordered list with jQuery, essentially I have
So What I'm essentially trying to do is have something happen 70% of the
I have what is essentially a jagged array of name value pairs - i
I have essentially a survey that is shown, and people answer questions a lot
I have a simple class that essentially just holds some values. I have overridden
i have a Sharepoint feature that essentially extends Lists with a new feature, using
I have a mockup layout for something here . Essentially there are sections, columns
I have a custom SharePoint page with several dataviews. The dataviews essentially filter documents
What I'm talking about here are nested classes. Essentially, I have two classes that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.