Using Resources file to store CSV Data File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leo1937ca
    New Member
    • Feb 2007
    • 2

    Using Resources file to store CSV Data File

    I have written a visual Basic 2008/2010 program that uses the data of a comma delimited csv file to populate a (2) dimensional array that is used as input to the Main Program. I want to embed the CSV File as a Embedded Resources File that is copied to the C:\Drive. Then when the Main Program Starts Up the CSV File is then used to populate a (2) dimensional array which is then used as Input to the Main Program. By embedding the CSV File as a Resources File it will compile as part of the executable program. There is very little information available regarding the coding of this process.

    The Original CSV File is FileName = "MyCSVFile. txt"
    The Filename of the File on C:\ Drive is "MyDataFile.txt "

    The Original CSV File is stored in the Resources File with the Build Action set as Embedded Resource.

    The CSV File when copied to the "MyDataFile.txt " will overwrite the current File if one exists and will be deleted when the Main Program is Closed.

    My current attempts to retrieve the Resources file generates <type> errors related to array dimensions.
    Any Help with attempting to standardize the process of copying an embedded CSV resources File to a File on a Hard Drive will be greatly appreciated.

    Please inform me if additional information is required.

    Thank You

    leo1937ca
    Last edited by leo1937ca; Mar 12 '15, 07:23 PM. Reason: change wording
Working...