Hi ,
We are using TUniQuery to edit a row from a access database.
SQL for query is something like this
UniQuery.SQL.Text:= 'Select * from "TableName" where sqlid = :sqlid'
UniQuery.params[0].Value := FSQLID;
UniQuery.Edit
but when we try to do UniQuery.Edit we getting the error "Cannot modify a read-only dataset"
I checked that isReadonly is false and unidirectional is false too. But when I checked canModify its returning as false. Realy not sure what's going on
Please help.
Thanks.
Cannot modify a read-only dataset
Re: Cannot modify a read-only dataset
**Sorry earlier I forgot to mention that I do set query to active. UniQuery.Active:=True; **
I want to update further that when I changed the SQL by removing quotes from table name , its working good.
So now the question is what's the reason when I set active, its getting active and even showing me rows with value, but when I edit its gives error and when table name dose not have quotes all works good.
Thanks.
I want to update further that when I changed the SQL by removing quotes from table name , its working good.
So now the question is what's the reason when I set active, its getting active and even showing me rows with value, but when I edit its gives error and when table name dose not have quotes all works good.
Thanks.
Re: Cannot modify a read-only dataset
Hello
To help you to resolve this issue, we need to know which data provider (or database) you are using.
To help you to resolve this issue, we need to know which data provider (or database) you are using.
Re: Cannot modify a read-only dataset
Thanks for reply.
I am getting this error while using access database.
Thank You.
I am getting this error while using access database.
Thank You.
Re: Cannot modify a read-only dataset
MS Access doesn't allow to create tables with case-sensitive names. For MS Access the table names TableName and TABLENAME are the same. So you shouldn't use quotes in table names. The сorrect queries are:
Select * from TableName where sqlid = :sqlid
or
Select * from [TableName] where sqlid = :sqlid
Select * from TableName where sqlid = :sqlid
or
Select * from [TableName] where sqlid = :sqlid
Re: Cannot modify a read-only dataset
Thanks for reply. I forgot to update, but I did noticed that after removing the quotes it worked good.
Thanks.
Thanks.