SQL Server Performance

how to insert a file into an image column?

Discussion in 'General Developer Questions' started by chopeen, Feb 4, 2005.

  1. chopeen Member

    Is it possible to insert a file into an image column using T-SQL (not ADO or textcopy.exe utility)?

    --

    Rediscover the web
    http://www.mozilla.org/firefox/
  2. satya Moderator

    Have a look at SQL Books Online topics around IMAGE data. Basically you'll have to use a client-side API like ADO, or the TSQL WRITETEXT, READTEXT, UPDATETEXT commands.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  3. chopeen Member

    quote:Originally posted by satya

    Have a look at SQL Books Online topics around IMAGE data. Basically you'll have to use a client-side API like ADO, or the TSQL WRITETEXT, READTEXT, UPDATETEXT commands.
    I've done that. But I have found no T-SQL statement that would take column name and filename as input parameters and then insert this file into that column.

    --

    Rediscover the web
    http://www.mozilla.org/firefox/
  4. FrankKalis Moderator

    http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part3/c1161.mspx might help. SQL Server's built-in functionality for handling BLOBs is rather poor. So by any chance using ADO is much easier. You won't find such a statement you're looking for yet.

    --
    Frank
    http://www.insidesql.de

Share This Page