Re: probably simple - Pro*C, gcc, Solaris 2.8 and connect

From: Dave <x_at_x.com>
Date: Sun, 11 Sep 2005 22:34:19 GMT
Message-ID: <Lh2Ve.106983$G8.51256_at_text.news.blueyonder.co.uk>


<spam.sink_at_volcanomail.com> wrote in message news:1126475852.502250.57410_at_f14g2000cwb.googlegroups.com...
> Hi everybody,
>
> I have two SUNs at home an Ultra 10 and a Blade 1000.
> I put 4Gb of RAM in the Blade installed oracle 9.2 on it
> and oracle client 9.2 on the U10.
>
> Now what I don't get is that I can sqlplus from the U10
> to the Blade and no problem. I can TNS ping it from the U10.
> And I swear that the definition in the tnsnames.ora
> looks perfect. I haven't tried toad but suspect it would work..
>
> I have written a small C application compiled with gcc the
> using the -m64 flag and I no matter what I try I can not
> get it to connect..
>
> In sqlplus I can do "sqlplus user_at_sid/password" but if
> I do:
>
> char *connstr = "user_at_sid/password";
> SQL EXEC
> CONNECT :connstr;
> END SQLEXEC
>
> I get the on error handler called and the error code with
> "oerr ora" map to could not resolve service name..
> I get -12154 and -3114 from the app...
>
> I had a look at some code snipits of where I used to work
> and they had the just user name and password in the Pro*C...
> But they have the database on the same box and anyway
> that was AIX... And they have heaps of DBAs..
>
> How does client/server work from C++ code ???
> Please help, some pointers or something please,
> I have spent a fortune on oracle books but still can't work it out...
> Is Pro*C a secret, why is it never talked about in the
> "complete reference" ??
>
> I anaylse kernel crash dumps and hack around in driver code
> for a living and can't be seen reading groups like this at work..
> Please respond to my hotmail account...
>
> My user ID is regan_russell..
>
> many, many thanks,
>
> Regan
>
the connect should be user/password_at_SID Received on Mon Sep 12 2005 - 00:34:19 CEST

Original text of this message