Home > MS CRM 4.0 > Working with BlobColumn in SSIS

Working with BlobColumn in SSIS


 
I was working with SSIS to migrate MS Access data to MS CRM 4.0.When i completed writting SSIS package everything working fine except Blob Column of MS Access.
As it’s rich text I’m not able to read data properly from BLOBCOLUMN.Aafter a long time googling around i got a cool stuff to deal with MEMO data type of MS Access.
 
Here is the sample code how to read MEMO field from MS Access
 
In this sample code Row.Notes is the MEMO column in MS Access
 

‘ Read 4000 bytes (2000 characters) from the stream

Dim buffer1 As New IO.MemoryStream(Row.Notes.GetBlobData(0, 10000))

‘ Get a stringBuilder to work with

Dim bldr1 As New Text.StringBuilder(10000)

‘ Convert the bytes from the buffer into an array of

‘ characters and put them into the stringBuilder

bldr1.Append(Unicode.GetChars(buffer1.ToArray()))

‘ Set the new Field value

note.notetext = bldr1.ToString()

 

Happy coding

Advertisements
Categories: MS CRM 4.0
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: