2007 Oct 11 12:01 PM
Hi All,
We currently have a program that connects to an external Oracle database using native SQL as shown below.
This program works perfectly, however we now want to us ADBC to connect to external Oracle DBs and we have decided to use this program as our pilot program.
I was just wondering has anyone here used ADBC to connect to an external Oracle database and what the code would be to convert the below code to use ADBC.
Many thanks for any help provided,
Points awarded,
Colm
*data decleration
DATA: f1(30),
f2(30),
f3(1) VALUE '7',
f5(1) VALUE IS INITIAL,
f4 TYPE zpodcounter-contr.
* Connect to DB
EXEC SQL.
connect to '*DBNameFromDBCONTable'
ENDEXEC.
IF sy-subrc <> 0.
MESSAGE w000(z2) WITH 'Could not connect to Oracle '.
ENDIF.
*Read from DB
EXEC SQL PERFORMING STORETOTABLE.
SELECT F_DOCNUMBER, A38 INTO :F1, :F2 FROM doctaba
WHERE F_DOCCLASSNUMBER = :F3
AND F_DOCNUMBER > :F4
AND A38 <> :F5
ENDEXEC.
Message was edited by:
Colm Gavin - blanking out database names for security
2007 Oct 25 4:20 PM
I resolved this issue myself. For the answer please message me.