'Updating data in a linked table is not supported by this ISAM.' When trying to update csv from c# code.

Mayur Nagrale 1 Reputation point
2021-10-25T04:03:22.523+00:00

public DataSet ExecuteDataSetQuery(string dbQuerry)
{
DataSet ds = new DataSet();
string tableName = new FileInfo(FilePath).Name;
string table = tableName.Split('.')[0];
if (dbQuerry.Contains(table))
{
dbQuerry = dbQuerry.Replace(table,tableName);
}
using (OleDbConnection cn = new OleDbConnection(conStrFrCsv))
{
//,new FileInfo(fileName).Name
//"select *from NewData.csv"
using (OleDbCommand cmd = new OleDbCommand(string.Format(dbQuerry), cn))
{
try
{

                    cn.Open();
                    using (OleDbDataAdapter adapter = new OleDbDataAdapter(cmd))
                    {
                        adapter.Fill(ds);
                    }
                }
                catch (Exception ex)
                {
                    throw;
                }
                finally
                {
                    cn.Close();
                }
                return ds;

            }
        }
    }
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
823 questions
0 comments No comments
{count} votes