Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_sql

Re: dbms_sql

From: Mikael Schonenberg <micke_at_netg.se>
Date: Thu, 23 Apr 1998 14:16:59 +0200
Message-ID: <Pine.LNX.3.96.980423141143.17949A-100000@valdez.netg.se>

Trust me, I sure wish you were right... Here comes the error message I've retrieved:

 Microsoft OLE DB Provider for ODBC Drivers error '80004005'

 [Microsoft][ODBC driver for Oracle][Oracle]ORA-06512: at line ORA-06512:  at line 1

It only mentions 6512 and nothing else (Hmm, gotta have a chat with the coder and see if he takes care of _everything_ that is retrieved though... might be something hidden in there).

On 23 Apr 1998, Matthias Gresz wrote:
>
> ora-6512 only metions that there was an error, There must be another
> error number indicating which eror occured.
>
> Mikael Schonenberg schrieb:
> >
> > I have some problems with dynamic SQL. I use the dbms_sql package to
> > dynamically create an sql query. With the define_column, fetch_rows and
> > column_value procedures/functions I seem to get just about the correct
> > data... at least when I test my procedure from SQL*PLUS. When I try to
> > call the procedure from outside Oracle, through ODBC, I run into an
> > ORA-06512. I've tracked down the bug to the column_value function, but to
> > be honest, I have absolutely no idea what to do about it.
> >
> > Here's a few lines from the code, just to illustrate what I'm doing;
> >
> > nCursorId := dbms_sql.open_cursor;
> > dbms_sql.parse(nCursorId, sSqlStatement, dbms_sql.native);
> > dbms_sql.define_column(nCursorId, 1, gFirstName, 20);
> > dbms_sql.define_column(nCursorId, 2, gLastName, 20);
> >
> > nRows := dbms_sql.execute(nCursorId);
> > nRows := dbms_sql.fetch_rows(nCursorId);
> > while nRows = 1 loop
> > dbms_sql.column_value(nCursorId, 1, gFirstName);
> > dbms_sql.column_value(nCursorId, 2, gLastName);
> >
> > It's the two last lines that causes the error...
> >
> > /Mikael

/Mikael Received on Thu Apr 23 1998 - 07:16:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US