Toad World® Forums

Problems using grid editor


#1

Hello Michael,

I haven’t been able to use the grid editor to insert data into a table.

Most tables in our databases don’t use declarative referentiel integrity although the logical RI are usually defined using sp_primarykey and sp_foreignkey.

All our tables have got at least one unique index.

When I open the grid is opens in read-only mode because there is no key column : that’s a bit unfair.

When I want to define custom editing all columns except the datetime columns are selected by default as key columns, all columns are selected as updatable columns and the table name is absent.

When I try to enter a row of data it displays an error message. Could it be because of the dates ?

BTW the insert statements are generated by Toad and there are too many brackets for my liking.

Notice that Toad can even speak french at times.

abe.sql (1.78 KB)

ScreenShot363.jpeg

ScreenShot364.jpeg

ScreenShot365.jpeg

ScreenShot366.jpeg


#2

Hello Jean-Pierre,

I ran your script to create the table ABE in my database and I was able to edit the grid without having to define a custom insert statement. Not sure what the difference could be…

Amazingly, the error when inserting data is because of the tinyint types. They were incorrectly mapped to binary in our code and thus the invalid conversion error. I went ahead and fixed this and it will work for you in the next beta.

Sorry about the brackets, maybe we can do something to optimize this in the future.

The French error messages come from the ASE client code and I just pass them to the UI.

Thanks.


#3

Hello Michael,

Since you could not reproduce the issue, I tried running it on an ASE 15.5 and you are right I don’t have to define a custom insert statement.

I was running the script on an ASE 15.53 server.

I then tried modifying data in another table on an ASE 15.5 and I got another error. Does that ring a bell ?
ScreenShot368.jpeg


#4

Hello Michael,

Since you could not reproduce the issue, I tried running it on an ASE 15.5 and you are right I don’t have to define a custom insert statement.

I was running the script on an ASE 15.53 server.

I then tried modifying data in another table on an ASE 15.5 and I got another error. Does that ring a bell ?
ScreenShot367.jpeg


#5

Hello Jean-Pierre,

For the 12.5.3 server it could have something to do with the OLEDB MDA scripts. The Sybase ADO.Net driver uses these stored procedures (sp_oledb_*) to pull its metadata. In order to fix this we will need to get the output from @@version and sp_version. This might require installing the latest ESD and I dont know if that is an option for you.

I have not seen that error happen before. Could you please send me the DDL for that table and I will see if I can reproduce the issue.

Thanks.


#6

Hello Michael,

I have downloaded Beta Build 999 and I am now able to update the data in the ABE table. So the tinyint mapping problem has been solved.

create trigger dbo.TR_U_ABE on dbo.ABE

as

declare @rc int

select @rc = count(*) from abe

I can now easily reproduce the “Concurrency violation problem” by simply creating a trigger on the table. Anything will do, so just try something stupid like
for update
and you should be able to reproduce the issue.

Concerning my 12.5.3 servers this is the info you asked for

@@version = Adaptive Server Enterprise/12.5.3/EBF 12338 ESD#1/P/NT (IX86)/OS 4.0/ase1253/1900/32-bit/OPT/Mon Jan 24 23:52:28 2005

and the output of sp_version is

installjdbc jConnect ™ for JDBC™/6.05(Build 25828)/P/EBF13044/JDK14/Fri Sep 30 1:05:16 2005 Complete

If all it takes is compiling stored procedures I can do the without problem but I don’t intend to install another 12.5.3 ESD since I am hoping to migrate all servers to
ASE 15.5 in the near future.


#7

Hello Jean-Pierre,

The concurrency violation issue has been fixed for the next beta.

I created CR 85,337 for the second issue involving the read only grid on older ASE versions.

Thanks.


#8

Hello Michael,

Any news about this issue ?

I am trying to update data in a table with a lot of columns.

Just the fact of having to untick every column selected by default by Toad as a key column one by one is a real drag when the table has a lot of them.

As I had mentioned before I use logical RI (sp_primarykey and sp_foreignkey).


#9

Hello Jean-Pierre,

I will escalate the enhancement for using logical RI in the next version. I will also add this thread to the current CR.

Thanks.


#10

Hello Michael

What is the status of this request ?


#11

Hello Jean-Pierre,

In the 1.2 release, the key column section will have all items unchecked by default.

Thanks.


#12

Hello Michael,

The concurrency violation issue came back in version 1.2 and is still there in the beta.

I was told by support to disable triggers when using the datagrid to do updates.

CaseID:1077581

And I told them that :

As far as I am concerned I consider this a bug of "Toad for Sybase" and if this is not corrected there is no way I can continue using grids in Toad which would be a real shame.

What is your feeling about this ?


#13

Hello Jean-Pierre,

You should not have to disable the trigger to edit data. I will work with support to get this issue resolved for you as soon as possible.

Thanks.


#14

Hello Michael,

I was checking this issue with beta 1.4.0.892.

The concurrency issue is solved and the key et updatable column item are unchecked by default, but once the key columns and updatable columns have been defined shouldn’t this information be displayed when going back to the “Define Custom Statement to Edit” window ?

Would it be possible to change the default for updatable columns and/or have something to check all/check none ?
121121_001.jpeg


#15

Hello Michael,

I was checking this issue with beta 1.4.0.892.

The concurrency issue is solved and the key et updatable column item are unchecked by default, but once the key columns and updatable columns have been defined shouldn’t this information be displayed when going back to the “Define Custom Statement to Edit” window ?

Would it be possible to change the default for updatable columns and/or have something to check all/check none ?
121121_002.jpeg


#16

Hello Michael,

I was checking this issue with beta 1.4.0.892.

The concurrency issue is solved and the key et updatable column item are unchecked by default, but once the key columns and updatable columns have been defined shouldn’t this information be displayed when going back to the “Define Custom Statement to Edit” window ?

Would it be possible to change the default for updatable columns and/or have something to check all/check none ?
121121_003.jpeg


#17

Hello Jean-Pierre,

Yes, the information should be displayed when going back to the table. I fixed this bug and it should be updated in the next beta build.

I went ahead and added a button panel to the drop down that will allow you to select all/none/invert (FYI, the icons are temporary, see screenshot). This will also be in the next beta.

Thanks.
selection.png


#18

Hello Michael,

I just checked if with Toad for Sybase 1.4.0.921 Beta Version and it does exactly what it should do.

Thanks.