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

  • SEARCH
  • Home
  • 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

Related Questions

Essentially I have two different flat files Credit & Account with different record structures.
I have essentially two programs: main.exe update.exe Update creates a flag file (update.inprogress) so
I'm trying to build a Hibernate layer for a database schema I have essentially
I have two essentially separate applications for configuring two pieces of hardware sold by
I have a SELECT CASE statement that I am trying to get working. Essentially
Essentially I have a mysql database with users and their corresponding date of birth.
So essentially I have two tables, containing URLS and TAGS, with a has-and-belongs-to-many relationship
I have data that I want to have written into a Microsoft Excel File.
If you have to use String.Replace() to replace test 50 times, you essentially have
Essentially I have a method of a class called killProgram, which is intended to

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.