Bind Variables

Note: please leave bug reports and feature requests on

Bind Variables

Postby csarmien » Tue Sep 06, 2011 1:47 am

Does someone know how to use bind variables in sql code with DBeaver?

e.g.

select * from table where id = :codigo

Right now, it raises an error:

[17041] Falta el parámetro IN o OUT en el índice:: 1

(in spanish because java locale definition; it translates to something like "IN or OUT parameter missing index :: 1")

Complete stack:
!ENTRY org.jkiss.dbeaver.core 4 0 2011-09-05 20:46:06.437
!MESSAGE org.jkiss.dbeaver.model.exec.DBCException: SQL Error [17041] [99999]: Falta el parámetro IN o OUT en el índice:: 1
!STACK 0
org.jkiss.dbeaver.model.exec.DBCException: SQL Error [17041] [99999]: Falta el parámetro IN o OUT en el índice:: 1
at org.jkiss.dbeaver.ext.oracle.model.plan.OraclePlanAnalyser.explain(Unknown Source)
at org.jkiss.dbeaver.ext.oracle.model.OracleDataSource.planQueryExecution(Unknown Source)
at org.jkiss.dbeaver.ui.views.plan.PlanNodesTree$ExplainPlanService.evaluate(Unknown Source)
at org.jkiss.dbeaver.ui.views.plan.PlanNodesTree$ExplainPlanService.evaluate(Unknown Source)
at org.jkiss.dbeaver.runtime.load.jobs.LoadingJob.run(Unknown Source)
at org.jkiss.dbeaver.runtime.load.jobs.LoadingJob.run(Unknown Source)
at org.jkiss.dbeaver.runtime.AbstractJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.sql.SQLException: Falta el parámetro IN o OUT en el índice:: 1
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1752)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at org.jkiss.dbeaver.model.impl.jdbc.api.JDBCPreparedStatementImpl.execute(Unknown Source)



Thanks in advance
csarmien
 
Posts: 1
Joined: Tue Sep 06, 2011 1:43 am

Re: Bind Variables

Postby Serge » Tue Sep 06, 2011 9:47 am

This feature is not yet implemented in DBeaver. DBeaver just passes your queries to database and (obviously) fails with error.
We have plans to add variable binding feature in next major release (probably in the end of September).

Note: variable binding is not included in SQL standard so it's not supported by many databases. However Oracle, DB2 and other major vendors support it.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb


Return to Support



Who is online

Users browsing this forum: Google [Bot] and 15 guests