Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Question Unanswered: BLOB field in SQL SERVER 2000

    Hi over there:

    I've been stuck for a while on this:
    I've got a delphi application and a SQL server 2000 as database..I've created a text field to store binary data..doc, xls, videos, everything...The thing works smoothly when I post throught ADO the data to the Server

    The problem comes when I retrieve the BLOB into the hard disk ..SQL server just only return of a pdf document of 150 kb just only 1 Kb ...therefore I cannot open the file.
    I check my code in Delphi and even I used ACCESS as back end and works!!!!!! ..I put a OLEObject field in the ACCESS database.

    My conclusion is there's something is going wrong when I stored the binary data in the text field in SQL server ...I surf the net as a maniac and I 've "increased" the size of my text field to 1000 byte

    sp_tableoption N'MyTable', 'text in row', '1000'


    but SQL keeps on retrieven just only the firs kb of the BLOB

    Can someone tell me what's happening?

    Thanks in advance

    greetings from Southafrica


    Navarra.

  2. #2
    Join Date
    Apr 2007
    Posts
    183
    Use IMAGE datatype.

  3. #3
    Join Date
    Jan 2009
    Posts
    3
    Hi Peso:

    Thanks a lot..in fact I did before receiving your answer...and it works perfectly well....it was so simple!!!!!!
    I have put already some files and no problem whatsoever.
    I'm retrieving the binary file into a file in the hard disk and through the API of windows I open the files
    My question now is......is it possible to open the files directly from the Tstream using Delphi without putting in the hard disk ?....I've not found anything yet in the web

    Can you suggest me something?

    By the way ...I'm a cuban civil engineer living in Southafrica ..and database aplications is my hobby ...

    thanking again

    Navarra

  4. #4
    Join Date
    Apr 2007
    Posts
    183
    I think OLEDB and ADO has a STREAM object.

  5. #5
    Join Date
    Jan 2009
    Posts
    3
    Thanks peso..I'll try to code your suggestion ..I'll let you know

    Navarra

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •