SQL Image to String Type Converter

Posts   
 
    
Emmanuel
User
Posts: 167
Joined: 13-Jan-2006
# Posted on: 24-Jul-2007 02:49:47   

I want to store what would normally be held in an ntext or varchar() column using an SQL image type. I want to do this to take advantage of SQL Server's fulltext filtering feature that is triggered on image columns only (to strip html tags from my data prior to applying search).

I looked at the sample Numeric/Boolean type converter in the SDK and it seems that only integral datatypes are allowed.

How would I implement a type converter so that .NET-side String types get converted to SQL-side Images and vice versa?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 24-Jul-2007 06:23:51   

Hello Emmanuel. Copied from LLBLGenPro Help:

LLBLGenPro wrote:

All .NET types supported The usage of a type converter doesn't stop with converting integers into booleans and vice versa. You can use it to write a converter for any .NET type. For example you can write a type converter to convert a string, which contains an XML document in text, to an XmlDocument and vice versa. Or a type converter which converts a byte array into a JPEG image and vice versa. This is then done under the hood, transparently.

To write your own type converter, please consult the SDK documentation for further details and the sourcecode of the type converters shipped with LLBLGen Pro, which is also enclosed in the SDK package.

So, you can start with that. It's pretty simple. You can read also this thread: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6071

Good luck simple_smile

David Elizondo | LLBLGen Support Team