Xbasic

SQL::DeleteStatement::GenerateNativeSyntax Function

Syntax

SQL_Statement as C = GenerateNativeSyntax([SQLConnection as SQL::Connection | SQLConnectionString as C])

Arguments

SQL_Statement

The native SQL equivalent of a Portable SQL expression.

SQL::DeleteStatement

A SQL::DeleteStatement object.

SQLConnection

SQL::Connection | SQLConnectionString

ConnectString

Optional. A connection string.

Description

Generate a native SQL statement using the selected syntax associated with the current or passed connection.

Discussion

The .GenerateNativeSyntax() method returns the native SQL version of the Portable SQL stored in the SQL::DeleteStatement.SQLStatement property.

Example

dim conn as SQL::Connection
dim del as SQL::DeleteStatement
dim connString as C
dim sql_delete as C
connString = "{A5API='Access', FileName='c:\program files\a5v7\mdbfiles\alphasports.mdb'}"
sql_delete = "DELETE FROM Customer_copy WHERE substring(lastname,1,1) = 'A'"
conn.open(connString)
del.parse(sql_delete)
? del.GenerateNativeSyntax(conn)
= "DELETE FROM Customer_copyWHERE (Mid(lastname, 1, 1) = 'A')"

See Also