PDA

Click to See Complete Forum and Search --> : SQL Server Query


VorTechS
Aug 30th, 1999, 07:46 PM
I want to use an UPDATE SQL query statement to update the contents of a memo field. So far I have tried using a statement similar to :-

UPDATE <table> SET memofield = memofield + <new data>

This statement does not appear to work with SQL Server and memo (text by SQL Server definition) fields.

Is there another way I can do this without opening a recordset to fetch back the current data?

Appreciate any help on this.

JHausmann
Aug 30th, 1999, 09:00 PM
Haven't used this so you get what you pay for.

There is a SQL server DML command called "Updatetext", using it in VB looks to be problematic, though. You need to get a pointer to the field (you have to use the function TEXTPTR to get it, returns a varbinary of 16), you'd need to have the insert_offset value (2nd parm) set to the length of the field, and finally the third parm (delete_length) set to 0.

So, to answer your question, yes there is a way. Problem is, it may not be feasible.