PreparedSQLStatement

From Xojo Documentation

Interface


New in 2010r4

Provides the API for working with prepared statements. Use Database.Prepare to create a PreparedSQLStatement.

Methods
Bind ExecuteSQL
BindType SelectSQL

Notes

Database.SelectSQL and Database.ExecuteSQL both support prepared statements without the need to use any of the prepared statement classes. These cover most cases.

The reasons for using the prepared statement classes are:

  • When using an uncommon column type that is likely unique to a particular database server. In that case, Database.SelectSQL and Database.ExecuteSQL may not function properly and your only choice would be to use the appropriate prepared statement class.
  • When repeatedly calling the same SQL statement in a loop. Using prepared statements in this case will increase performance as the prepared statement won't need to be recreated each time as is the case with Database.SelectSQL and Database.ExecuteSQL.

You do not typically need to work directly with this interface. Instead use the appropriate PreparedStatement class for the database you are using:

See Also

MSSQLServerPreparedStatement, MySQLPreparedStatement, ODBCPreparedStatement, OracleSQLPreparedStatement, PostgreSQLPreparedStatement, SQLitePreparedStatement