dbQuery(3dba)


dbQuery -- send an SQL query to a database

Synopsis

cc [flag ...] file ... -kthread -leels [library] ...
#include <eelsdba.h>

DBResult *dbQuery( DBConn *conn, char *query);

Description

dbQuery sends an SQL query to the database. Because each database supports its own unique method for delimiting SQL queries, dbQuery adds the appropriate delimiter to the query. Callers of this function should supply only the SQL query.

Arguments


conn
(Input) A connection to a database from a previous call to dbConnect(3dba).

query
(Input) The SQL query to be sent to the database.

Return values

If the query is successful, dbQuery returns a pointer to a DBResult structure. Otherwise, dbQuery returns NULL.

Diagnostics

An application can call dbGetError(3dba) to obtain the error message returned from the database.

References

dbConnect(3dba), dbGetError(3dba), Intro(3dba)


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004