Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] DECLARE SECTION
The declare section is for interfacing with Oracle. For ex,. let's say
you have a query and it returns a string of at most 12. Then you declare
a VARCHAR smthing[13] ; ( in the declare section) Then in your query
you select string into :smthing and you have a value in your varchar
but reminder there is no indicator in my ex. I would suggest you do
some readin from Pro*C book.
Dogan
Alex Vinokur wrote:
> Hi,
>
> I'm going to use Pro*C/C++ Precompiler in Oracle.
>
> I work with C/C++/STL, but I didn't work with SQL.
> So I have many questions.
>
> Here is a piece a code.
>
> ------------ Piece#A ------------
>
> <C++ Code : Part#1>
>
> EXEC SQL BEGIN DECLARE SECTION
>
> <C++ Code : Part#2>
>
> EXEC SQL END DECLARE SECTION
>
> <C++ Code : Part#3>
>
> ---------------------------------
>
> 1. What is DECLARE SECTION used for?
> 2. What is the difference between
> Piece#A and Piece#B?
>
> ------------ Piece#B ------------
>
> <C++ Code : Part#1>
>
> <C++ Code : Part#2>
>
> <C++ Code : Part#3>
>
> ---------------------------------
>
> =================================
> Server : Oracle8
> Development Platform : Pro*C/C++
> =================================
>
> Thanks in advance,
> Alex
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Mon Jun 21 1999 - 13:55:20 CDT