SQLTableConvertToEmbedded - cDbUpdateFunctionLibrary

To convert an SQL table to embedded. If you instead want to convert an Embedded DataFlex (.dat) table to SQL see: ApiTableConvertToSQL


Typical usage for this function is when you need to convert from one SQL back-end to another. There is no method in the framework to make an SQL -> SQL conversion. This is considered a very unusual situation. Instead you need to create one cDbUpdateVersion object and use the SQLTableConvertToEmbedded function for a table. Then in another cDbUpdateVersion object you can use the ApiTableConvertToSQL method to convert from Embedded to SQL.



Type: Function


Parameters: Handle hTable Boolean bCopyData

Parameter

Description

hTable

A file handle to the table name. Same as the Filelist.cfg slot number.

bCopyData

Pass a True if data should be copied to the new table


Syntax


Function SQLTableConvertToEmbedded Handle hTable Boolean bCopyData

Call:

Get SQLTableConvertToEmbedded Suppliers.File_Number True to bOK



Description

Use it to convert an SQL table to a DataFlex .dat (Embedded) file. The file handle is the same as the file number in Filelist.cfg.


Example 1


Object oDbUpdateVersion1 is a cDbUpdateVersion


    Procedure OnUpdate

        Boolean bOK

        Get SQLTableConvertToEmbedded Employees.File_Number False to bOK

    End_Procedure


End_Object