Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ProC problem
It's been awhile since I've used Pro*C but it seems to me you
need the special VARCHARdefinition not char
which means you need the appropriate header file and need to
strcpy to the arr part of the VARCHAR structure and then set
the len part of the structure
or you need to use the string equivalence feature.
I recall a good example in the samples files that are shipped
with the PRO*C product.
Becca
> Hi all,
> I am trying to connect to a remote database from a ProC
> procgram, but hit a problem.
> I used this piece of code:
>
> char localstr[200];
> sprintf(localstr,"user/password_at_tnsname");
> exec sql connect :localstr;
>
> and it core dumps with ILL signal (illegal instruction).
>
> I tried running sqlplus with the same user/password_at_tnsname
> combination, and it works. So the tnsname part is OK.
>
> I'm using Oracle 7.3.4 on Digital Unix 4.0F.
>
> Any help will be much appreciated.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
>
--
This answer is courtesy of QuestionExchange.com
http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6334&cus_id=USENET&qtn_id=6335
Received on Mon Oct 25 1999 - 21:00:58 CDT