dbTalk Databases Forums  

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

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Any Pro*C/C++ users out there? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Ramon F Herrera
 
Posts: n/a

Default Re: Any Pro*C/C++ users out there? - 09-07-2009 , 10:09 AM






On Sep 7, 10:57*am, Maxim Demenko <mdeme... (AT) gmail (DOT) com> wrote:
Quote:
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 assword;

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

Reply With Quote
  #12  
Old   
Ramon F Herrera
 
Posts: n/a

Default Re: Any Pro*C/C++ users out there? - 09-07-2009 , 10:24 AM






On Sep 7, 11:09*am, Ramon F Herrera <ra... (AT) conexus (DOT) net> wrote:
Quote:
On Sep 7, 10:57*am, Maxim Demenko <mdeme... (AT) gmail (DOT) 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 assword;

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
I am glad to report that I am very close to building my first non-
trivial C++ program.

I began with a complex, operational C program.

The only issues left are conversions from "char *" to "unsigned char
*". My guess is that I should change all my strings to C++ string
type.

-Ramon

Reply With Quote
  #13  
Old   
Paulie
 
Posts: n/a

Default Re: Any Pro*C/C++ users out there? - 09-21-2009 , 11:28 AM



On Sep 6, 6:32 pm, Ramon F Herrera <ra... (AT) conexus (DOT) net> wrote:


Quote:
As far as Java (one of my favorite all-time languages! - Have several
Java programs that I would never port) there is no way it can even
approach the performance of a native language.

Aren't there Java compilers out there that will compile to
native code and not byte code?

I think the gcc will do this - a google appears to bring
up lots of stuff.


Paul...


> -Ramon

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.