Xbasic

SQL::InsertStatementParse Method

Syntax

Result_Flag as L = Parse([SQLStatement as C])

Arguments

Result_Flag

TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).

SQL::InsertStatement

A SQL::InsertStatement object.

SQLStatement

Optional. A Portable SQL statement.

Description

Parse the SQLStatement passed (or the value previously set into the SQLStatement property).

Discussion

The .Parse() method parses the SQL_Statement string (or the value previously set into the SQL::InsertStatement.SQLStatement property).

Example

dim conn as SQL::Connection
dim connString as C
dim ins as SQL::InsertStatement
dim sql_insert as C
connString = "{A5API='Access', FileName='c:\program files\a5v7\mdbfiles\alphasports.mdb'}"
sql_insert = "insert into customer (firstname, lastname, bill_city, bill_postal_code,bill_state_region) values ('George', 'Jones', 'Arlington', '02000', 'VA')"
? conn.open(connString)
= .T.
? ins.parse(sql_insert)
= .T.
? ins.execute(conn)
= .T.

See Also