Re: Memory exception with connection to Oracle
Date: Sat, 17 Nov 2007 11:07:10 -0700
Message-ID: <f6buj3h0lbldlrqheied4vtm2vi4o9dnm1_at_4ax.com>
On Wed, 14 Nov 2007 06:52:04 -0000, vinod.katare_at_gmail.com wrote:
>Hi,
>
>When i am trying to execute the below code, getting the memory
>exception " Unable to read memory". Can anybody suggest me of what can
>be the problem?
>Also the exception is only if a add a createconnection statement. For
>connection to oracle from iSQLPLus i am using the same usr/pass
>without hoststring and its working there.
>
>Thanks,
>Vinod K
>
>#include "occi.h"
>#include<stdio.h>
>#include<string.h>
>#include<conio.h>
>using namespace oracle::occi;
>main()
>{
> Environment *env ;
> Connection *conn=env->createConnection("scott", "tiger","");
> printf("Done");
> getch();
>}
Your env is uninitialized so of course env->createConnection() will be
trying access garbage.
-- Kevin English Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.comReceived on Sat Nov 17 2007 - 19:07:10 CET