Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > SQLExecQuery FunctionThis custom VB function executes a SQL statement on a connection established by SQLOpen. NOTE: Siebel VB SQLxxxx functions are supported for non-Unicode databases only. SyntaxSQLExecQuery(connection, query) ReturnsThe number of columns in the result set for SQL SELECT statements as a variant. UsageIf the function is unable to execute the query on the specified data source, or if the connection is invalid, a negative error code is returned. If SQLExecQuery is called and there are any pending results on that connection, the pending results are replaced by the new results. CAUTION: This function, as well as the other SQL functions available in Siebel VB, should not be used to query the underlying database. Use the Siebel Object Interfaces to query Siebel data. Use the SQL functions only to query non-Siebel data. ExampleThis example performs a query on the data source. Sub Button_Click ' Execute the query retcode = SQLRetrieve(connection: = connection, _ ' Get the next 50 rows of from the result set See AlsoSQLClose Function |
Siebel VB Language Reference |