[DB-SIG] DCOracle - prepare samples needed.
Fri, 14 Jul 2000 12:57:24 -0600
It's pretty simple with DCOracle.
Assuming a valid connection object named 'dbc':
h = dbc.prepare( sql )
# a handle always takes a tuple of positional parameters
h.execute( ( 1, ) )
# Now it acts just like a cursor object
for ( name, ) in h.fetchall():
* Luiz Tadao Honda (email@example.com) [000621 09:30]:
> I trying to prepare a query with input parameters like:
> sql='select name from user where id=:p1'
> to let Oracle make the execution plan only once and then substitute the
> variable p1 with the real values.
> Does anyone have some samples to help me?
> Luiz Honda
> DB-SIG maillist - DB-SIG@python.org
Eric Brunson - firstname.lastname@example.org - email@example.com
"When governments fear the people there is liberty. When the people
fear the government there is tyranny." - Thomas Jefferson