Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

File in SQL

Hi...

Does anyone know how to "upload" a file into an SQL database?
I want to do this from a Delphi application.

Regards,
Roald
Norway

Comments

  • MasterijnMasterijn Member Posts: 188
    : Hi...
    :
    : Does anyone know how to "upload" a file into an SQL database?
    : I want to do this from a Delphi application.
    :
    : Regards,
    : Roald
    : Norway
    :
    There's a LoadFromStream method on a TBlobField, you can create a TFileStream object and put it in as a parameter. You can download the file with SaveToStream. You can also use a TMemoryStream to save to, in that way you can, by example, load a JPeg directly from a database without creating a file first.


  • rs@chello.nors@chello.no Member Posts: 17
    Hi there, and thanks for your respons.

    But is it possible for you to provide me with an example, og point me to a web site that got the actual code?

    I tried several things to make it work, but had no luck...
    Tried the code in Delphi help to, but also with no luck.

    Regards,
    Roald, Norway

    : : Hi...
    : :
    : : Does anyone know how to "upload" a file into an SQL database?
    : : I want to do this from a Delphi application.
    : :
    : : Regards,
    : : Roald
    : : Norway
    : :
    : There's a LoadFromStream method on a TBlobField, you can create a TFileStream object and put it in as a parameter. You can download the file with SaveToStream. You can also use a TMemoryStream to save to, in that way you can, by example, load a JPeg directly from a database without creating a file first.
    :
    :
    :

Sign In or Register to comment.