Can I save text in BLOB column?

  • Hi experts,

      I have a textbox and a upload file function in my asp.net page.

    User can either copy/paste their resume in text or upload their resume file and submit the application.

    The uploaded file will be saved into a BLOB column in SQL Server 2000, but do you know if text in textbox can be saved into BLOB column? 

    I received error message on the code:

    'save Applicant resume to a BLOB-image datatype column

     objComd.Parameters.Add(New SqlParameter("@AppResume", SqlDbType.NText))

    error:Exception has been thrown by the target of an invocation.

    Operand type clash:ntext is incompatible with image

  • You know you can always try this stuff out when you have a question like that:

    create table #t ( a int, b image )

    insert into #t select 1, 'sadsf'

    select CONVERT( VARCHAR(5),  substring( b, 1, 5 ) ), b

    from #t

     

     

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply