write large text data into SQL database
It's said that SQL Server 2000 Text datatype can store text data up to 2GB.
In ADO there's adLongVarChar type that should be used to send large amount
of text data to stored procedure's parameter, which type is defined as Text.
In stored procedure following syntax should write large amount of text into
EXEC sp_dboption 'databaseX', 'select into/bulkcopy', 'true'
SELECT @ptrval = TEXTPTR([Html])
FROM table_name where id = @id
WRITETEXT table_name.XDataFiled @ptrval @XLargeText
exec sp_dboption 'databaseX', 'select into/bulkcopy', 'true'
where @XLargeText is stored proc's parameter and databaseX is the database's
name that I'm using.
So my questions are:
1. how to use ADO to send the whole text chunk to the stored procedure?
2. It seems that adLongVarChar max value is not 2GB, it's much less than
that, something like 20000 characters. Or then I don't know how to determine
the size of the ADO's parameter: at least when I use adVarChar, the size
is determined by the max amount of characters.
All tips are welcome!
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center