Hi Mark,
I can tell you what's going on inside Squirrel, but not why you are
seeing this result.
Squirrel's data editing is designed to work with any table, even those
that do not have primary keys. It does the edit by creating an UPDATE
statement with a gigantic WHERE clause using all of the columns in the
table with the values for the row containing the cell that you changed,
as in:
WHERE integerColumn1=5 AND stringColumn2='somedata' AND ....
Thus, as long as the row is unique in the DB, the update should update
only the one row.
However, before attempting the update we do some checks to make sure we
don't do something bad to your database. You are getting a message from
one of these checks. Specificly, before doing the update, we create a
WHERE clause containing all of the values from the row, including the
_original_ value in the field you just changed and do a SELECT. For the
update to work correctly, this should come up with exactly 1 row, and if
it does, then the update is done without further ado. However, if it
does not find the original row, then it figures that someone else might
have changed it since you read the contents, so it warns you.
What you are seeing is the following sequence:
- Squirrel read the table
- you edited some data and said "update it" (by leaving the cell)
- Squirrel looks for the row containing the original values and
cannot find it, so it warns you that something weird is happening.
One thing that I know that might cause this problem is if the only
fields in the table were of types that cannot be used in a WHERE clause,
such as BLOB or CLOB.
If you could post the schema for this one table, that might help us.
Glenn
Mark Neher wrote:
>
> No, all the tables in our schema have a primary key. Thanks for the
> idea, though.
>
> Mark
>
>
>> From: "Simon Grantham" <SGR...@fl...>
>> To: <mar...@ho...>,<squ...@li...>
>> Subject: Re: [Squirrel-sql-users] problem editing
>> Date: Wed, 08 Feb 2006 14:53:02 -0500
>>
>> I'm guessing that the table you are trying to update has no primary key.
>> In this circumstance, squirrel has no real way of knowing which record
>> it is supposed to update. That is, you are blocked because an update
>> command might update multiple records instead of just the one you
>> edited.
>>
>> Just a guess though.
>>
>> Simon
>>
>>
>> >>> "Mark Neher" <mar...@ho...> 08/02/2006 11:46 am >>>
>>
>> Hey All,
>>
>> I am having trouble editing in SQuirreL. If I make a table editable,
>> it
>> allows me to click in a cell and make changes. When I try to save the
>>
>> changes, a panel pops up saying
>>
>> "This row in the Database has been changed since you refreshed the
>> data.
>> No rows will be updated by this operation.
>> Do you wish to proceed?"
>>
>> Clicking yes yields "No rows updated."; no cancels. Trying to edit
>> using
>> the popup rather than in the cell gives the same results.
>>
>> I don't see any mention of this in the help, or in the mailing lists
>> online.
>> Any ideas ?? BTW, I am running version 2.1 final on a Linux box, and
>>
>> attaching to an Oracle database.
>>
>> Thanks,
>>
>> Mark
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files
>> for problems? Stop! Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the web. DOWNLOAD
>> SPLUNK!
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>>
>> _______________________________________________
>> Squirrel-sql-users mailing list
>> Squ...@li...
>> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Squirrel-sql-users mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
>
|