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

Home -> Community -> Usenet -> c.d.o.misc -> ORA-24336: invalid result set descriptor using OCILogon

ORA-24336: invalid result set descriptor using OCILogon

From: <klasi_at_writeme.com>
Date: Fri, 25 Sep 1998 11:17:05 GMT
Message-ID: <6ufu3h$mbo$1@nnrp1.dejanews.com>


Hi, there

I got two problems using this function call : OCILogon (new Oracle8 API).

First Problem i got solved, second get's me the error: ORA-24336

First problem was the description in

Oracle Product Documentation Library
section : Oracle8 Enterprise Edition
subsection : Application Programming Interfaces subsection : Programmer's Guide to the Oracle Call Interface Chapther 13 OCI Relational Functions, Page 79 (Reference of OCILogon)

they say :

This call allocates the error and service context handles which are passed to it.

WRONG ! When you try to use the function OCILogon() without allocateing the error handle you get an 'invalid Handle passed' error. Since you pass 3 handles in this function detecting which one is wrong isn't easy. So you got to allocate the error handle with OCIHandleAlloc().

Right after, they tell you :

This call also implicitly allocates server and user session handles associated with the session. These handles can be retrieved by calling OCIAttrGet() on the service context handle.

Okay, when i try to get the server handle with OCIAtrrGet(), i get the error :

*******following the error description *****
ORA-24336: invalid result set descriptor Cause: The result set descriptor should have valid data fetched into it before it can be converted to a statement handle Action: Fetch valid data into the descriptor before attempting to convert it into a statement handle.


This time Allocating the server handle before, doesn't solves the problem.

I would be very glad, if anbody could give me a hint.

I'm delveloping in MS C++ Visual Studio 5.0 on win95, the oracle8 databaseserver is located on a NT-Server station.

*****following the C++ Source************

***

  protected:

	OCIEnv		*m_envi_hndl_ptr;
	OCIServer	*m_serv_hndl_ptr;
	OCISession	*m_sess_hndl_ptr;
	OCIError	*m_erro_hndl_ptr;
	OCISvcCtx       *m_srvi_hndl_ptr;

***

rt_code = OCIHandleAlloc(m_envi_hndl_ptr ,(dvoid**)&m_erro_hndl_ptr , OCI_HTYPE_ERROR, 0 , (dvoid **)0);

***

  rt_code = OCILogon (	m_envi_hndl_ptr, m_erro_hndl_ptr, &m_srvi_hndl_ptr,
						usr, usr_length,
						pwd, pwd_length,
						db, db_length);

  handle_error(rt_code,m_erro_hndl_ptr))
  rt_code = OCIAttrGet(	(dvoid*)m_srvi_hndl_ptr,OCI_HTYPE_SVCCTX,
	       (dvoid*)m_serv_hndl_ptr, NULL, OCI_ATTR_SERVER,m_erro_hndl_ptr);

ERROR: OCI-24336 : invalid result set descriptor

by Holger Klasmeier

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Sep 25 1998 - 06:17:05 CDT

Original text of this message

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