comp • gb.db • _connection • exec

Connection.Exec (gb.db)

Function Exec ( Request As String, Arguments As , ... ) As Result

Executes an arbitrary SQL request, and returns a read-only Result containing the result of the request.

  • Request is any SQL request.

  • Arguments are quoted as needed by the SQL syntax, and substituted inside the Request string

The last feature allows you to write requests that are independant of the underlying database type.

Only SELECT queries return a Result object. You don't have access to the number of modified rows at the moment.

Example

TheResult = DB.Exec("SELECT * FROM UserTable WHERE Login = &1 AND Password = &2", TheLogin, ThePassword)

See also