Script functions reference > Script functions in alphabetical order > O > OdbcExecute

OdbcExecute
Syntax
OdbcExecute(str_dbidentifier, str_sql_statement);
str_dbidentifier 
str_sql_statement
Description
Executes SQL statements. Any result sets that the statement generates are ignored. This function can be used, for example, to update record fields in the data source. To use this function, you must first write the SQL statement and give it an identifier. You then use the OdbcExecute to execute the statement.
Se also OdbcExecuteEx.
Returns
1
-1
Example
$st="INSERT INTO CUSTOMER(CNR)VALUES("+$custid+");"); OdbcExecute("my_identifier",$st);
In this script, the customer ID is stored in a variable. An SQL statement is written using the value of this variable. $st would contain something like the following when OdbcExecute is called:
INSERT INTO CUSTOMER (CNR) VALUES (124);
OpenText StreamServe 5.6 Updated: 2013-03-01