Editing data in output window
I am already a user of DataGrip and JetBrains products, I had my friend download and purchased DataGrip. I helped him connect to an SQLServer instance. For some reason, he cannot edit tables based on query results. In other words, if I execute a query for a single table, in my personal DataGrip I can edit that tables data in the output window. When I try the same thing on him, it states that the table is read only. Is there a setting for this? I can't seem to find the difference between the two DataGrip installs or the connections to the "same" db. Any help with this would be great.
thanks
请先登录再写评论。
Hi,
DataGrip allows editing tables in output window only for simple queries. Could you provide query you can't edit result for?
Thank you.
select * from table where id=id
@Gerald Klein Hi,
Could you specify your DataGrip version?
Do you use Microsoft or jTds driver for connection?
I can not reproduce the problem with query `select * from table_name2 WHERE column_2 = column_2`.
Thank you.
I have same trouble with MySQL in DataGrip 2017.1
Query is simple. Like "select * from table where id = id"
I tried change data source flags "Auto-commit" and "Auto-sync". I tried switch on/off padlock icon. In all cases I see "This table is read-only. Cell editor changes cannot be applied".
How I can save edited value?
I am having the sample problem.
I tried the padlock, "Auto-commit", and re-syncing all schemas. I am a sysadmin in the database.
I never had an issue with this until I upgraded to DataGrip 2017.1
Am Connecting to SQL Server with jdbc
anyone have a solution for this???
Hi,
Could you provide DDL for tables with such problems?
Thank you.
I have problem with any tables in any mysql database. I don't check other (not mysql) databases.
vasily chernov, my english is very bad. But I think you speak russian. Where I can describe problem using russian language?
Hi,
You can write here.
Thank you
Thanks.
В общем, проблема присутствует с любой таблицей в любой mysql базе. Можно создать новую простенькую таблицу с двумя полями id и name и в окне результата не получится изменить значение. Выглядит это так. Делаем селект из одной таблицы без всяческих джойнов и замысловатых условий. В окне результатов кликаем мышкой в нужное поле (например, в то самое поле name). Редактируем значение, жмём клавишу Enter и видим сообщение, что таблица read-only. Пытался и в строке кнопок (под табами открытых файлов) играться с галочкой автокоммита, и менять галочку в источнике данных в окне их настройки, и без перезагрузки DataGrip, и с перезагрузкой. Добиться, чтобы изменённое в окне результата значение смогло сохраниться в базу - так и не смог.
@Nornad Привет.
В "простенькой" таблице есть ключи? Было бы проще, если был бы конкретный запрос на создание такой таблицы.
Спасибо.
@vasily chernov
Повторюсь - проблема с любой таблицей. Например, с такой (на всякий случай проверил на ней тоже) :
create table nortemp (
id int(11) not null autoincrement,
name varchar(20),
primary key (id)
) engine=InnoDB default charset=utf8 collate=utf8_unicode_ci;
Таблица только для чтения в окне результатов и при
select * from nortemp
и при селекте по конкретному id.
@vasily chernov
Обнаружил, что если создать другой источник данных, в котором не запрещать чтение структуры БД (в настройках источника Options/Load sources for = None и в Schemas все схемы отключены), то результат селекта из таблица не находится в режиме только чтения.
Правильно ли я понимаю, что DataGrip для возможности изменения значений в окне результатов обязательно надо иметь возможность читать структуру БД?
@Nornad Hi,
Yes, you're right. You need to add a table you want to modify to database tree (into introspection scope).
Thank you.
Thanks
I have the same issue with
DataGrip 2019.3.3
Build #DB-193.6494.42, built on February 12, 2020
with simple query select * from table;
my connection is MySQL connect to local database installed on local machine,
For other connections, to my RDS server on AWS it works fine.