ApiTableCopyData - cDbUpdateFunctionLibrary

 To copy data from an Embedded .dat table to an existing SQL table. This function is called automatically by the ApiTableConvertToSQL if the pbCopyData property is True (the default value). The table structures needs to be the same.


Type: Function


Parameters: Handle hTable String sPhysicalName String sRootName String sDriverID

Parameter

Description

hTable

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

sPhysicalName

The physical table name as defined in Filelist.cfg

sRootName

The rootname of the table as defined in Filelist.cfg

sDriverID

The database driver ID


Syntax


Function ApiTableCopyData Handle hTable String sPhysicalName String sRootName String sDriverID

Call:

Get ApiTableCopyData "MyTable" "MyTable" MSSQLDRV_ID to bOK



Description

Use it to copy data to an SQL table.


Example


// This sample is for Microsoft SQL Server

Object oDbUpdateVersion1 is a cDbUpdateVersion

    Set pnVersionNumber to 1.0


    Procedure OnUpdate

        Boolean bOK

        Get ApiTableCopyData "Customer" "Customer" MSSQLDRV_ID to bOK

    End_Procedure


End_Object