Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSV - Amend Single Data Item

Status
Not open for further replies.

TickerTimer

Programmer
Jul 2, 2010
7
GB
Hi

Can some one point me in the right direction please.

I need to find a record (row) in a CSV files and amend/replace one (or more) data items in that row.

I know how to read and write data but cannot see how to find and amend individual data items.

How do I go about this?

Thank you.
 
You could use OLEDB to make a connection. See here for a connection string.

Or, you could make a new file to overwrite the current file. You'd need to get a string of all of the data which comes before and after your changes, and concatenate/write them all together.
 
Thanks for your reply RiverGuy.

I've used the OleDb to read / write in the past which is great.

I need to avoid it on this occassion as a few users are using 64 bit software which OleDb wont operate on.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top