Re: Any Pro*C/C++ users out there?

From: Ramon F Herrera <ramon_at_conexus.net>
Date: Mon, 7 Sep 2009 08:09:56 -0700 (PDT)
Message-ID: <61046f6a-7286-4183-9a65-bbefd436dfc1_at_q7g2000yqi.googlegroups.com>



On Sep 7, 10:57 am, Maxim Demenko <mdeme..._at_gmail.com> wrote:
> Ramon F Herrera wrote:
> > I have a new question. I took a C program that precompiled, compiled,
> > linked and executed perfectly.
>
> > Now I am trying to convert it into a C++ program.
>
> > My current problem is that the following four variables are not
> > recognized by the C++ precompiler:
>
> > varchar         username[UNAME_LEN];
> > varchar         password[PWD_LEN];
>
> > EXEC SQL CONNECT :username IDENTIFIED BY :password;
>
> > int howMany;
> > varchar table_name[SOME_SIZE];
>
> > EXEC SQL SELECT COUNT(1) INTO :howMany FROM user_tables WHERE
> > table_name = :table_name;
>
> > It seems like the variables embedded into the EXEC SQL statements need
> > a different syntax?
>
> > TIA,
>
> > -Ramon
>

 > I'm not a c/c++ developer by any means

By your answers, it seems to me like you are a more competent C++ developer than myself. :-)

You are absolutely right, that was indeed the problem.

Now I have a new one, to be posted next.

Thanks!

-Ramon Received on Mon Sep 07 2009 - 10:09:56 CDT

Original text of this message