My Oracle Support Banner

ODBC Calling Stored Procedure With DEFAULT Parameter Fails With "SQLExecDirect with return code -1 (SQL_ERROR)" (Doc ID 1363054.1)

Last updated on JULY 05, 2017

Applies to:

Oracle ODBC Driver - Version: to - Release: 10.2 to 11.2
Information in this document applies to any platform.


A SQL_ERROR on SQLExecDirect occurs
when calling a procedure from Oracle ODBC driver  which contains DEFAULT parameters

create or replace package foo as
procedure fooproc (v1 IN VARCHAR2 DEFAULT 'foo');

create or replace package body foo as
procedure fooproc (v1 IN VARCHAR2 DEFAULT 'foo') is
begin null; end;

fails and shows this in the ODBC trace

Odbc c6c-1b08 EXIT SQLExecDirect with return code -1 (SQL_ERROR)

When tested in vbscript this can appear as error

Provider: Unspecified error

An example using vbscript shown below. This procedure also contains a DEFAULT parameter.

set con = createobject("adodb.connection") "dsn=orcl;uid=scott;pwd=tiger"
con.execute "{call ordsys.ORD_DICOM.setDataModel()}"
wscript.echo "done"


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.