Subject: Re: Memory exception with connection to Oracle From: Kevin English Date: Sat, 17 Nov 2007 11:07:10 -0700 Message-ID: References: <1195023124.094373.290500@e9g2000prf.googlegroups.com> Bytes: 1573 Lines: 48 Path: text.usenetserver.com!out01b.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!news-out.spamkiller.net!sp12lax.superfeed.net!not-for-mail Newsgroups: comp.databases.oracle.tools X-Proxy-User: $$gij8p2nrd X-Newsreader: Forte Agent 4.2/32.1118 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Report: Please report illegal or inappropriate use to . Forward a copy of ALL headers INCLUDING the body. (DO NOT SEND ATTACHMENTS) X-Comments2: IMPORTANT: Newsfeeds.com does not condone,support,nor tolerate spam or any illegal or copyrighted postings. X-Comments: This message was posted through Newsfeeds.com Organization: Superfeed.net Xref: usenetserver.com comp.databases.oracle.tools:181834 X-Received-Date: Sat, 17 Nov 2007 13:07:13 EST (text.usenetserver.com) On Wed, 14 Nov 2007 06:52:04 -0000, vinod.katare@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 >#include >#include >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.com