Modifying the source code
About this task
The source code for the Poem DataBlade® module is in the Poem.c file in the src/c directory, which you can see in Visual C++ under the Source Files node of the File view.
Support routine category | Smart large object handling |
---|---|
Text Input and Output Functions |
|
Binary Send and Receive Functions | The PoemSend() and PoemReceive() functions move the binary format of the smart large object handle between the database server and client computers. |
Binary File Import and Export Functions | The PoemImportBinary() and PoemExportBinary() functions perform bulk copies of the binary format of the smart large object handle between the database server and external files. |
Text File Import and Export Functions | The PoemImportText() and PoemExportText() functions perform bulk copies of the text format of the smart large object handle between the database server and external files. |
Contains Large Objects Routines |
|
Type Compare Functions | The PoemCompare() function compares the handles of two opaque data types and determines whether they are the same. The PoemEqual() and PoemNotEqual() functions call the PoemCompare() function. |
The default behavior for the PoemOutput() function is to generate a random number file name. However, you can modify the source code for this function so that it generates a meaningful file name: the title of the poem. The data files for the Poem DataBlade module are XML files containing poems by Edgar Allan Poe. The title of the poem appears in the beginning of the file; you can extract the title and use it to create the file name. You use DataBlade API functions to open and read smart large objects; the process is similar to opening and reading a file.
To add code to the PoemOutPut() function: