7 Replies Last post: Feb 18, 2004 6:30 PM by Adam  
Adam  Novice 127 posts since
Aug 26, 2002
Currently Being Moderated

Dec 8, 2003 7:43 PM

SQL-Plugin Editing Data

Hello,

 

I just started using SQL_plugin, and excuse my blindness , I do not know how to edit the data in displayed results?

Is there a possibility to double click on a row or cell and change the vaule?

 

I know I can use SQL (update or insert), but it is so much typing....

 

Guest
Currently Being Moderated
Dec 8, 2003 7:56 PM in response to: Adam
Re: SQL-Plugin Editing Data

There are a number of conditions for editing the results:

 

     

  • The query has to be simple like 'select * from table_x'

       or 'select column_a, column_b from table_x' because I must

       parse it for the table name.

     

  • The table must contain a key column (displayed in yellow)

           If the plugin couldn't obtain the key column automatically

       you can also specify it manually by using the context menu

       of the table. Note if you specify a column as key column

       which is no real key it's possible that more than one row is updated.

     

  • The plugin must be able to determine the class for a column

       either by the returned values or through the JDBC driver. If the

       JDBC driver doesn't support the feature and all values are NULL

       it's not possible.

     

  • Only simple types like Number, Boolean, String and Date are editable.

 

Bye, Stefan.

 

 

Adam wrote:

 

Hello,

 

I just started using SQL_plugin, and excuse my blindness , I do not know how to edit the data in displayed results?

Is there a possibility to double click on a row or cell and change the vaule?

 

I know I can use SQL (update or insert), but it is so much typing....

 

 

 

Guest
Currently Being Moderated
Dec 10, 2003 12:44 AM in response to: Guest
Re: SQL-Plugin Editing Data

I'm testing your plugin (pretty cool so far) and would like to be able to edit results as well.  I'm using postgres 7.4, but its not finding the keys automatically.  If I right click on the columns I can assign the keys, but I have to do that with every results table that I want to try to edit a value in...even if its a table that I have specified the primary keys in the past. 

 

Is there anyway to let the plugin know that this is the key I want it to always use for that particular table?  Would be nice to have the plugin remember the key settings for each table.

 

Thanks...

Guest
Currently Being Moderated
Dec 11, 2003 12:58 PM in response to: Adam
Re: SQL-Plugin Editing Data

I think remembering manual selected keys is the best solution.

Using the first column as primary key would only work for queries with no explicit

columns like 'select * from table'.

 

Bye, Stefan.

 

Adam wrote:

 

 

>>Is there anyway to let the plugin know that this is

>>the key I want it to always use for that particular

>>table?  Would be nice to have the plugin remember the

>>key settings for each table.

>>

 

Maybe the Plugin could have another option, checkbox like

"assume every first colum is primary key" ?

It would work in most cases (at least with the tables we design ) and help the people that cannot access metadata.

 

What do you think about a such simple solution?

 

 

 

Guest
Currently Being Moderated
Feb 17, 2004 9:48 PM in response to: Guest
Re: SQL-Plugin Editing Data

Hi,

 

How about using JDBC's Updatable Result Set feature?

 

Is this not feasible?  Seems like this is exactly what

it was designed for.  I don't know how many drivers

support it though.

 

--Joachim

More Like This

  • Retrieving data ...