Antwort: Re: Antwort: SQL Input from user

Mario Curcija <[email protected]> Mon, 28 Apr 2008 17:01:05 +0200
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <OFB85763B3.59C678B7-ONC1257439.005069F8-C1257439.00527F7C@lex-com.net>
--=_alternative 00527F7AC1257439_=
Content-Type: text/plain; charset="US-ASCII"

Hi Hans, 

You are right about that second one. It does not suit your needs. 

On the other hand, the first one was actually what you've needed. Please 
check it again: 

"Can I directly obtain a java.sql.Connection within OJB?"
http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a

After getting a connection you should be able to create statement, execute 
it and get a result set from it.

Further reading: http://java.sun.com/docs/books/tutorial/jdbc/TOC.html.

"Retrieving Values from Result Sets" 
http://java.sun.com/docs/books/tutorial/jdbc/basics/retrieving.html


Best regards,
Mario Curcija


Hans Novak <[email protected]> schrieb am 28.04.2008 16:24:07:

> Mario Curcija schrieb:
> > 4.22. Is it possible to perform my own sql-queries in OJB?
> > http://db.apache.org/ojb/docu/faq.html#performSQL
> > 
> Hi,
> 
> ok, that is a beginning ;)
> But in the doc is described
> 
>    Query q2 = QueryFactory.newQuery(Article.class, sql);
> 
> 
> how can i use this, if i dont know, what classes are needed for the 
> SQL string ?
> 
> Hans
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

--=_alternative 00527F7AC1257439_=--