Storing RTF in SQL
-
hello, I need to store RTF (from a net richtext boxes RTF property) on an SQL table. The size could be anything up to 16 or 17 Mb. Whats the best datatype to use and has anyone got a codesnippet that could help. if its something like binary then is it possible that I can search the field with a standard SQL statement such as in: Select * where Fld Like "*Stuff to Find*" Thanks in advance Martin
life is a bowl of cherries go on take a byte
-
hello, I need to store RTF (from a net richtext boxes RTF property) on an SQL table. The size could be anything up to 16 or 17 Mb. Whats the best datatype to use and has anyone got a codesnippet that could help. if its something like binary then is it possible that I can search the field with a standard SQL statement such as in: Select * where Fld Like "*Stuff to Find*" Thanks in advance Martin
life is a bowl of cherries go on take a byte
MartyK2007 wrote:
Whats the best datatype to use and has anyone got a codesnippet that could help.
If SQL Server 2000 then
IMAGE
If SQL Server 2005 thenVARBINARY(MAX)
Since RTF is contains text only with some crazy formatting instructions embedded in the text then you can also useTEXT
,NTEXT
,VARCHAR(MAX)
orNVARCHAR(MAX)
. The latter two in SQL Server 2005.MartyK2007 wrote:
if its something like binary then is it possible that I can search the field with a standard SQL statement such as in: Select * where Fld Like "*Stuff to Find*"
I would look at Full text indexing for something like that.
Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website
-
MartyK2007 wrote:
Whats the best datatype to use and has anyone got a codesnippet that could help.
If SQL Server 2000 then
IMAGE
If SQL Server 2005 thenVARBINARY(MAX)
Since RTF is contains text only with some crazy formatting instructions embedded in the text then you can also useTEXT
,NTEXT
,VARCHAR(MAX)
orNVARCHAR(MAX)
. The latter two in SQL Server 2005.MartyK2007 wrote:
if its something like binary then is it possible that I can search the field with a standard SQL statement such as in: Select * where Fld Like "*Stuff to Find*"
I would look at Full text indexing for something like that.
Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website
dont I have to specify a MAX value though for VARBINARY(MAX) I wouldnt want to restrict the size if possible (other than database size limits of course) thanks Martin
life is a bowl of cherries go on take a byte
-
dont I have to specify a MAX value though for VARBINARY(MAX) I wouldnt want to restrict the size if possible (other than database size limits of course) thanks Martin
life is a bowl of cherries go on take a byte
ok stupid question - just googled VARBINARY(MAX) thanks for that it seems to fit what I neeed Martin
life is a bowl of cherries go on take a byte