By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,044 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,044 IT Pros & Developers. It's quick & easy.

Using Resources file to store CSV Data File

P: 2
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

Mar 10 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.