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 -> Re: Help with Pro*C

Re: Help with Pro*C

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: 1 Nov 2005 12:31:58 -0800
Message-ID: <1130877118.103444.164570@g47g2000cwa.googlegroups.com>

xiaoluma_at_gmail.com wrote:
> Michel Cadot wrote:
> > <xiaoluma_at_gmail.com> a écrit dans le message de news: 1130790876.504991.307580_at_o13g2000cwo.googlegroups.com...
> > | Though that field is called Acct_Num, it is char data type. The
> > | compiled program even does not reach the select statement.
> > | Thanks.
> > | Xiaolu
> > |
> >
> > I doesn't see anything in what you posted that shows the program didn't reached the select statement.
> > Incidently, has Acct_Num no more than 3 characters?
> >
> > Regards
> > Michel Cadot
>
> Michel,
> I am sorry, I forgot to past the latest version of my small program.
> I have a
> printf ("After connection string.\n");
> immediately after the
> EXEC SQL CONNECT :connstr;
> the out put does not show this sentence. But it shows everything before
> the EXEC SQL CONNECT :connstr;
> That's why I assume that the problem is in EXEC SQL CONNECT :connstr;
> I have talked to the people in my team, they are suing OCI instead of
> ProC, the DBA does not know this either. I am just very very curious:
> why my code does not work?
> Thank you very much.
> Xiaolu

So have you tried a divide and conquer debug approach? GO ahead and remove everything except the connect from the main code. If that still fails, then it clearly the connect.

If it does (and bare in mind I haven't been doing any ProC for a few years), then maybe try changing the declaration of connstr from a pointer to an array. IOW
connstr[]="connection string here" ;

Yes it should behave the same, but from the code you posted, I see nothing wrong with the connect.

HTH,
  ed Received on Tue Nov 01 2005 - 14:31:58 CST

Original text of this message

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