|
|
|
|
|
- Canceling the existing link
- Difference between BinaryLoad and <Source>.LinkMemo
- HFSQL thumbnails
- Managing memos in SQLite
<Source>.LinkMemo (Function) In french: <Source>.AttacheMémo
Not available with this kind of connection
Used to associate a file with a binary memo item or to cancel the existing link between a file and a binary item. The file will be read and added to the memo only when the record is added or modified ( <Source>.Add, <Source>.Modify or <Source>.Write). The function will return an error if the file is opened in write mode and if the hAcceptOpenedFile constant was not used. Note: Direct assignment is also possible: - To associate an image (found in an Image control) with an image memo:
<FileName>.<NameMemoItem> = <NameImageControl> For example:
AFile.AMemoItem = IMG_AnImageControl
This syntax can be used with both the HFSQL engine and Native Connectors.
<FileName>.<NameMemoItem> = <BufferName> For example:
bufFile is Buffer = fLoadBuffer("MyFile")
MyFile.MyMemo = bufFile
Product.LinkMemo(Product_Img, "C:\Images\Product1.gif", hMemoImg)
MyWindow.ToFile()
Product.Add()
Syntax
Associating a file with a binary memo item Hide the details
<Result> = <Source>.LinkMemo(<Item> [, <File to attach> [, <Type> [, <Information>]]])
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HError is used to identify the error. The function will return an error if the file to associate is opened in write mode and if the hAcceptOpenedFile constant was not used.
<Source>: Type corresponding to the specified source Name of the data file (or query) containing a memo item. If only <Source> and <Item> are specified, <Source>.LinkMemo cancels the existing link between the binary file and the item. <Item>: Character string Name of the memo item of the data file into which the binary file must be added. If only <Source> and <Item> are specified, <Source>.LinkMemo cancels the existing link between the binary file and the item. <File to attach>: Optional character string Name of the file that will be associated with the binary memo item. This name can correspond to: - the full path of the file to attach,
- a relative path (respective to the current directory) of the file to attach.
If this parameter is not specified or is an empty string (""), the current attachment is deleted..
<Type>: Optional combination of Integer constants Indicates the type of file to attach and its read mode. | | hAcceptOpenedFile | Allows you to read the source file that will be added to the memo if this source file is opened in write mode somewhere else. This constant can be used with the constants for file type. | hMemoBin (default value) | The file is an ordinary binary file. | hMemoImg | The file is an image file. | hMemoOle | The file is an OLE file. | hMemoWav | The file is a sound file. |
<Information>: Optional character string Information message (up to 65535 characters) stored with the file. This message can be read again by <Source>.InfoMemo. Remarks Canceling the existing link If only <Data file> and <Item> are specified, <Source>.LinkMemo cancels the existing link between the binary file and the item.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|