Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about accessing long fields thru Pro-C
W. Donnan wrote:
>
> I have a table that stores a very long string as type long. I am trying
> to read the value of the string into a char variable in my Pro-C
> application:
> char tmpstr[2000];
>
> EXEC SQL SELECT longstring into :tmpstr
> FROM mytable
> WHERE ....
>
> When the query executes, I get an ORA-0932 error (inconsistent
> datatypes). Does anyone know how to make this work?
You're not referring to the long column in your where clause are you? If not, the above should work. I've got quite a few Pro*C programs which fetch long columns into character arrays. Your tmpstr array is within the EXEC SQL DECLARE section at the top of the program right?
![]() |
![]() |