CodeSmith Community
Your Code. Your Way. Faster!

TextFileDataProvider How would I create one?

Latest post 10-10-2006 11:32 PM by jcteague. 6 replies.
  • 10-09-2006 9:33 PM

    TextFileDataProvider How would I create one?

    Hey everybody!  Just wanted to say that I love .NetTiers.  It is awesome beyond words.  Thank you soo much for all your hard work.

     I was given the requirement to read in a set of data in a text file with the format:

    Header: Date: mm/dd/yyyy

    16-19 digit credit card,9 digit ssn number

    16-19 digit credit card,9 digit ssn number

    etc... 

     
    Date: 09/29/2006
    XXXXXXXXXXX68318   ,XXXXXX697
    XXXXXXXXXXX62793   ,XXXXXX431
    XXXXXXXXXXX48566   ,XXXXXX832
    XXXXXXXXXXX46252   ,XXXXXX531
    XXXXXXXXXXX69259   ,XXXXXX783
    XXXXXXXXXXX41667   ,XXXXXX362

     It was easiest for me to create a Cards table in SQL Server with the credit card number as the primary key and the SSN as a field in that table.  I then  used .NetTiers to generate the code for me.  This is great but the data is going to reside in a text file and not
     in a SQL Server.  So, I was wanting to get some advice from the .NetTiers community about changing the provider from SQL to a TextFileDataProvider or something similar so I can read in all the values.  I don't need all the CRUD functions.  Just Read and Find by Credit Card Number.

    Thanks! 

    Filed under:
    • Post Points: 35
  • 10-09-2006 10:15 PM In reply to

    Re: TextFileDataProvider How would I create one?

    Wow, that's some pretty sensitive data to keep in a text file, you sure this as best as you can do?  Can we offer some options if you really need to store that data in a secure manner?


    Robert Hinojosa
    -------------------------------------
    Member of the Codesmith Tools, .netTiers, teams
    http://www.nettiers.com
    -------------------------------------
    • Post Points: 35
  • 10-09-2006 11:51 PM In reply to

    Re: TextFileDataProvider How would I create one?

    Not to mention you just posted them to the world? If thoughs are real remove them immediately moron.
    ------------------- rob_nettiers -------------------
    • Post Points: 65
  • 10-10-2006 1:37 AM In reply to

    • mcquiggd
    • Top 25 Contributor
    • Joined on 07-11-2006
    • Amsterdam
    • Posts 174
    • Points 4,375

    Re: TextFileDataProvider How would I create one?

    And i'd do it quickly - before Google decides to keep them available on the web for you... any mods around that can remove them?
    David (Could people PLEASE click the 'Mark As Answer' button on the message that solved their problems - it will help others with similar questions and could potentially be included in an FAQ to save time for all of us)
    • Post Points: 5
  • 10-10-2006 9:35 PM In reply to

    Re: TextFileDataProvider How would I create one?

    rob_nettiers:
    Not to mention you just posted them to the world? If thoughs are real remove them immediately moron.
    Dude these are fake Credit card numbers randomly generated so I can test the system.

    So, any thoughts? 

    • Post Points: 5
  • 10-10-2006 9:38 PM In reply to

    Re: TextFileDataProvider How would I create one?

    I just noticed somebody edited them.  lol  Nothing to worry about.  I generated 17000 random credit card numbers and just grabbed the first few.  Thanks for being extra careful though.  This is a customer requirement I can't get around this.  They want it to be stored in a text file. This server will be behind a bank firewall so don't worry about security.  I need this to work with a text file.  If you can't get past the idea of it being a credit card just think of it as being a 16 - 19 digit number, and a 9 digit number.  Thank you guys so much for your carefulness!

     

    • Post Points: 35
  • 10-10-2006 11:32 PM In reply to

    • jcteague
    • Top 25 Contributor
    • Joined on 03-10-2005
    • Austin, Tx
    • Posts 442
    • Points 10,925

    Re: TextFileDataProvider How would I create one?

    I think you will need to create a custom Data Access Block.  Several People have created them for other databases.  If you got the Enterprise Library User Samples, you will find some for databases like mysql, etc.
     
     
    I know that ADO.Net supports text files so this should be possible.
     
    HTH

     
    On 10/10/06, brandontyler <bounce-brandontyler@codesmithsupport.com> wrote:

    I just noticed somebody edited them.  lol  Nothing to worry about.  I generated 17000 random credit card numbers and just grabbed the first few.  Thanks for being extra careful though.  This is a customer requirement I can't get around this.  They want it to be stored in a text file. This server will be behind a bank firewall so don't worry about security.  I need this to work with a text file.  If you can't get past the idea of it being a credit card just think of it as being a 16 - 19 digit number, and a 9 digit number.  Thank you guys so much for your carefulness!

     





    Thanks, John Teague ------------------------------ Member of the .NetTiers team http://www.nettiers.com ------------------------------

    • Post Points: 5
Page 1 of 1 (7 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems