Xbasic
SQL::ConnectionGenerateCreateTableStatement Method
Syntax
Statement as C = GenerateCreateTableStatement as C (TableInfo as SQL::TableInfo)
Arguments
- TableInfoSQL::TableInfo
A SQL::TableInfo object.
Returns
- StatementCharacter
A SQL CREATE TABLE statement.
Description
Generate a SQL CREATE TABLE statement for the table passed in.
Discussion
The GenerateCreateTableStatement() method generates a SQL CREATE TABLE statement for the table defined by .
Example
dim conn as SQL::Connection dim ti as SQL::TableInfo dim statement as C if .not. sql_TableInfoOfDBF("c:\program files\a5v8\samples\alphasports\product.dbf", ti) ui_msg_box("Error", "Could not create SQL::TableInfo") end end if if .not. conn.open("{A5API=Access, FileName='C:\Databases\Northwind\northwind.mdb', UserName='Admin'}") then ui_msg_box("Error", conn.CallResult.text) end end if statement = conn.GenerateCreateTableStatement(ti) ui_msg_box("Create Table Statement", statement)
See Also