hi. I'm new here.
just want to ask if there's away to edit/update a csv file record.
I'm using ODBC Text File Driver. I've read it only supports Insert.
Are there other ways to do this?
thanks in advance.
Printable View
hi. I'm new here.
just want to ask if there's away to edit/update a csv file record.
I'm using ODBC Text File Driver. I've read it only supports Insert.
Are there other ways to do this?
thanks in advance.
Moved From The CodeBank
Why not just use the basic File I/O?
You should be able to update... what's not allowed is delete. What error messages are you getting and whats your code?
Hi. thanks for the reply.
this is the error that I'm getting when I try to update:
Connectivity error: [Microsoft][ODBC Text Driver] Updating data in an attached (or linked) table not supported by this ISAM.
this is my update code:
If RS_TimeOut.RecordCount > 0 Then
RS_TimeOut.MoveFirst
RS_TimeOut!out_hh = IntOutH
RS_TimeOut!out_mi = strTMi
RS_TimeOut!kintai_status = Val(tmpKintaiStatus) + Val(updKinStat)
RS_TimeOut!out_db_dh = Date & " " & Time
RS_TimeOut!upd_dh = Date & " " & Time
RS_TimeOut!edit_flg = "1"
RS_TimeOut.Update
End If
thanks in advance!
What's your connection string?
hi. this is my connection string.
Driver={Microsoft Text Driver (*.txt; *.csv)};};Dbq=c:\Program Files\Microsoft Visual Studio\VB98\syain_login1\Data\;Extensions=asc,csv,tab,txt;
hope you can help me out.
thanks.
I stand corrected, it seems update isn't possible on a linked text file.
If you don't want to perform file I/O as suggested earlier, you can use excel automation and work with the csv as a worksheet. There may be other alternatives, we'll have to wait for others to give their own suggestions.