Working with Images

  • Guys,

    I need to upload a txt file with 10 MB to SQL Server 2000. I created the file and in SQL Server 2012 using varbinary it works fine and after upload I check the size of the table with 1 row and it is +- 10 MB ok.

    In SQL Server 2000 when I upload and get the size it shows to me , using sp_spaceused

    Reserved 32 KB and Data 24 KB..

    I am using the code :

    Table Table1 : Id Int identity, File image

    DECLARE @RowId INT

    INSERT Table1(File) VALUES (0xFFFFFFFF)

    SELECT @RowId = SCOPE_IDENTITY()

    -- get a pointer value to the row+column you want to

    -- write the image to

    DECLARE @Pointer_Value varbinary(16)

    SELECT @Pointer_Value = TEXTPTR(File)

    FROM Table1

    WHERE Id = @RowId

    -- write the image to the row+column pointer

    WRITETEXT Table1.File @Pointer_Value 'c:\temp\file.txt'

    I am supposing , as SQL Server 2012, the sp_spaceused show 10MB space used.

    I Used the textcopy tool and it upload the image and in the sp_spaceused showed me 10 MB

    What I am missing ?

    Tkx guys

    $hell your Experience !!![/url]

Viewing 0 posts

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