To insert OLE object into the field of object type the user should click the icon
. A dialog box “Insert object” shown at figure 25-2 will be opened.
Figure 25-2. Dialog box “Insert object”
It is possible to insert OLE object by one of three methods:
Create a new object using one of Windows applications registered as OLE servers. Created object will be stored in the structure of current GDB (a separate file will not be created for the object), and viewing and editing the object contents will be performed using the appropriate OLE server.
To create a new OLE object the radio button Create New should be checked. A list of object types supported by the existing OLE servers will be displayed in the dialog box. After selecting the object type and pushing the button OK a window of the corresponding server application enabling the user to edit and view the created object will be opened.
Create an object as part of GDB structure. The contents will be copied from the existing file of one of the types processed by OLE servers. After object creation the link between the object and the original file is broken, the object is stored and processed just like a newly created object.
To use this method the radio button Create from File should be checked, but the box Link should be cleared. The necessary file should be selected using the button Browse. If the user wants to view the file contents first, he can use the button Preview. After pushing the button OK the object will be copied into GDB.
Create a link between GDB table field and the file which contains OLE object. In this case the object will be still stored in the file, only the path to this file will be stored in GDB. Such a method of using OLE objects is called linking unlike object embedding performed in two previous cases.
To create the link the radio button Create from File and the box Link should be checked. The necessary file should be selected using the button Browse. As in the previous case, to view the object contents the button Preview can be used.
User work with a linked object has almost no differences from work with an embedded object, however, to keep the link valid one should make sure that the file containing OLE object always was on the specified path. In this connection, the user should select in which form it is most convenient to store the path to the file of the object before creating a link. If the box Save Relative Path is checked, the path to the file is specified with respect to the folder in which the current GDB is located. If the box is cleared, the absolute path beginning from the disk letter is stored. For example, the file Estimate.xls linked with the demo GDB “N-City” is stored in the same folder DEMO as the GDB itself. The relative path in this case consists only of the file name “Estimate.xls.”, and the absolute path looks approximately like this:
“C:\Program Files\ObjectLand\DEMO\Estimate.xls”.
If a relative path is used, when GDB is moved to another folder it is required to move the object file with it. An absolute path is convenient in the case if the object file will not be moved together with GDB.
In the pane Result the system clarifies expected consequences of object creation with the current state of radio buttons and checkboxes.