Running Queries in JCAPS

How can we connect to a DB and fire DB queries in JCAPSPlease help me
[83 byte] By [krishnan_gopu] at [2007-11-26 11:50:18]
# 1
Did you read already read through the eWay Adaptor for Oracle and/or SQL server user guides + samples ?
guido@be at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2
Pls refer eGate_Tutorial.pdf.thanksRam
RamSai at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 3
Option 1: use Oracle eWay to establish connection and create Oracle DB OTD using prepare statements.Option 2: Use Oracle eWay to establish connection and then directly execute SQL queries.For more information refer OracleeWay_UG/eGate_UG
achintaysagar at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 4

Hello,

I am just trying to solve simple task and your second solution seems to be right. But I am not enough experienced in JCAPS to write it without help..

What I need to write is eg. JCD where the input is general SQL query from file - it may be insert into table (but not to specific table) or execute procedure execution. Results are further transformed with Java...

Is there any example how to do this? How to connect to DB and run general query? I have read eWay_Sybase_UG and scanned eWay_Oracle_UG, but without success...

Thanks in advance,

Jirka

Jiri_Trpkos at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 5

Hi,

According to my knowledge for this type of requirement, u have to write

code as you write for jdbc programs.

That is get database connection, createstatement,executeQuery.

Steps

1)Create user defined OTD for ur inoput query with one field as string.

2) Create OTD using any database wizard[like JDBC or ORACLE].

While creating OTD just select preparedstatements options, at least

u have to select one option from three. Don't give any input for

preapred statement just click next and finally click finish.

3) Create JCD and select database OTD.

4) Write JDBC code like

Connection con = OTD.getConnection().

Statement st = con.createStatement()

int result = st.executeUpdate("query").

There might be other better procedures for your requirement, but i

have posted whatever i know. Hope it will help you in some way.

Regards

Venkatesh.S

VenkateshSampoornam at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 6
Thanks for your help, it works:-)Jirka
Jiri_Trpkos at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 7
Thanks for your help, it works:-)Jirka
Jiri_Trpkos at 2007-7-7 12:04:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...