CreateTableEnd

Method
Closes a create table handle.

Category
Database

 

Syntax
Sub CreateTableEnd(hCreateTable As Long)

hCreateTable
A create table handle.

 

 'Creates table Number from Parameter1 and Name from Parameter2

  CF1.CreateTableBegin hTable, CLng(.Text1(cf.TableNoCreate)), .Text1(cf.TableNameCreate), 1

  logWr "CreateTableBegin: " + Str(hTable)

  CF1.AddTableField hTable, 1, "Felt1", 7, 2, "", 0

  CF1.AddTableField hTable, 2, "Felt2", 7, 2, "", 0

  'Adding Key

  IntArray(0) = 1

  IntArray(1) = 2

  IntArray(2) = 0

  KeyArray = IntArray

  CF1.AddKey hTable, KeyArray, KeyArray

  logWr "Addkey result: OK"

  tmpVar = CF1.CreateTable(hTable)

  If VarType(tmpVar) = vbBoolean And tmpVar = True Then

  logWr "CreateTable result: OK"

  Else

  logWr "CreateTable result: Failed"

  End If

  CF1.CreateTableEnd hTable

  logWr "CreateTableEnd: " + Str(hTable)

 

Comments
CreateTableEnd closes the create table handle that hCreateTable acquired by calling CreateTableBegin.

If you have not called CreateTable, any fields and keys you may have defined with AddTableField and AddKey will be lost.



© 2009 Microsoft Corporation. All rights reserved.