Save a file into a Blob Field ?

fgodefroidtfgodefroidt Member Posts: 11
Hi,

I'm new on this forum. I'm looking for how to save an XML File (or any file) in a Blob Field.

I'm Working with Version 5.00 - with SQL 2000 - French editions

Fred

Answers

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Use the myBlobField.IMPORT function to store a file into a BLOB-field in the database.

    Quoting on-line help:
    IMPORT (BLOB)
    Use this function to import a BLOB (Binary Large Object).
    
    [ImportName :=] := Blob.IMPORT([Name [, CommonDialog]])
    ImportName
    
    Data type: filename
    
    The name and path of the file the system imported.
    
    If ImportName is...
     It means the BLOB was...
     
    The file's name and path Imported 
    Blank Not imported 
    
    Blob
    
    Data type: variable
    
    The BLOB you want to import.
    
    Name
    
    Data type: text or code
    
    The path and name of the BLOB you want to import. When you enter the path, keep in mind these shortcuts:
    
    You can...
     If the command is located...
     
    Omit the drive designation On the current drive 
    Omit the full path In the current directory 
    Enter only the subdirectory name In a subdirectory of the current directory 
    
    CommonDialog
    
    Data type: boolean
    
    This tells the system whether or not you want it to display a dialog before it imports the BLOB. This dialog window lets you select the file you want to import. Based on the SubType property, the system only lists the appropriate file type, such as bitmap files (*.bmp), memo files (*.txt), or all files (*.*).
    
    If CommonDialog is...
     It means the system will...
     
    TRUE Display the confirmation dialog 
    FALSE (default) Not display the confirmation dialog
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • fgodefroidtfgodefroidt Member Posts: 11
    yes, it's good, now.
    Thanks !

    Fred
Sign In or Register to comment.