2nd update after update memo field corrupts row 
Author Message
 2nd update after update memo field corrupts row

I've got a 6.5 sp2 database with a table containing many normal fields
and 3 textfields.

If I modify the normal fields using an UPDATE query, all goes well.

If I modify one of the text fields, the next time I run the stored
procedure I use to lock the record with my custom lock field (which
doesn't modify any memo fields), the row becomes corrupted.  The
timestamp field becomes NULL and some keys end up with trash
characters.

This behavior only began after I added some text fields.  I am at a
loss.

The code that I use to update the record (bill address is a text
field) looks like:

update tSite SET billAddress='xxxxafafadfadfadfafadf' ,revDate =
'3/19/97' ,lockUser = NULL,lockWs = NULL,lockTime = NULL where siteCtr
= 5 and tsequal(siteTs, convert(binary(8),
convert(money,429499.5888)))

The stored procedure is as follows:

CREATE PROCEDURE prLockSite

)
as





        from tSite



begin
        raiserror (55000, 1,1)
        return 1
end


        begin
                raiserror(55001, 1, 1)
                return 1
        end

UPDATE tSite





begin

        from tSite

end

-- if there is an error in select, will return that or a
-- 0 for success

GO

How can I make my database work with these text fields?  I don't
understand how SQL Server can corrupt a row.  This sounds like a bug
to me.  Are there some workarounds so that I can get text fields to
work?
--



Mon, 06 Sep 1999 03:00:00 GMT
 2nd update after update memo field corrupts row

Quote:

> I've got a 6.5 sp2 database with a table containing many normal fields
> and 3 textfields.

> If I modify the normal fields using an UPDATE query, all goes well.

> If I modify one of the text fields, the next time I run the stored
> procedure I use to lock the record with my custom lock field (which
> doesn't modify any memo fields), the row becomes corrupted.  The
> timestamp field becomes NULL and some keys end up with trash
> characters.

> This behavior only began after I added some text fields.  I am at a
> loss.
> ... snip ...

There have been many problems posted to this newsgroup regarding
corruption of text fields with SP2.  You may try going back to SP1 or
wait for SP3, which should be forthcoming.

--
------------------------------------------------------------
To reply by e-mail, remove NOSPAM_ from my e-mail address.
------------------------------------------------------------



Tue, 07 Sep 1999 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. 2nd update after update memo field corrupts row

2. 2nd SQL Server update after update text field corrupts row - using RDO

3. Updating data to a memo field using SQL UPDATE

4. Using a trigger to update a time field in a table when a row is updated

5. Update field on updated row with trigger??

6. SQL Server update error: row cannot be update for updating

7. Updating a text col with NULL corrupts row...

8. Update a field with time stamp when other field are updated

9. Update Memo-Column with SQL UPDATE Statement

10. ODBC Update of Text field corrupting table...

11. ODBCdirect unable to update Memo fields (bug?)

12. Updating Interbase memo field using TQuery


 
Powered by phpBB® Forum Software