I am tring to delete or update a CSV file using a ADODB recoredset in VB6.0. Its giving a error multipal data can't be updated. Ony can help me to give the solution how to update CSV file using Recordset.
Acctualy i am having some (around 50) records in my CSV file. I am able to add new records in the same file but not able to update nor delete the record from the CSV files. When i run this code it gives error mesg
objconnection active connection
strPathtoTextFile = App.Path & "\Data\"
If objconnection.State <> 0 Then Set objconnection = Nothing
objconnection.ConnectionString = _
"Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
"DefaultDir=" & strPathtoTextFile
objconnection.Open
Private Function deleteob()
Dim showrs As New ADODB.Recordset
Dim sqlstr As String
sqlstr = "delete from Observation.csv where ob_code=" & txtOb_code
If showrs.State <> 0 Then Set showrs = Nothing
showrs.Open sqlstr, objconnection, adOpenDynamic, adLockOptimistic
End Function
It gives error mesg "Delete Data in a linked table is not supported by this ISAM".
Enter your message below
Sign in or Join us (it's free).