Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

READTEXT COMMAND

Status
Not open for further replies.

swreng

MIS
Jun 22, 2006
90
GR
Dear all,

I am using the following syntax in order to read a text field on my database.

set textsize 104857600
EXEC sp_dboption 'crm', 'select into/bulkcopy', 'true'
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(txt)
FROM TABLE1 WHERE AUTOID=8
ReadText TABLE1.txt @ptrval 0 0
EXEC sp_dboption 'crm', 'select into/bulkcopy', 'false'

The size of my field is 2110765.

With the above method only 4096 characters are read.

If i write something greater than my field's size then doesn't working.

Only if i declare in the size something less or equal of my field's size is working, like this:

EXEC sp_dboption 'crm', 'select into/bulkcopy', 'true'
DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(txt)
FROM TABLE1 WHERE AUTOID=8
ReadText TABLE1.txt @ptrval 0 2110765
EXEC sp_dboption 'crm', 'select into/bulkcopy', 'false'


So how can i find the size dynamic and declare it on the READTEXT command and what is the meaning of textsize property?


Many thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top