Hi,

Here Craig described what difficult would be to interact with an
external SQL program, and he-s right. Opposed to my previous answer,
he assumed Sam wants to start SQL*Plus at server side, I understood client
side (where the user sits).. Sam, where do you want SQL*Plus to run?
(telnet however is more-or-less Unix specific -
 it might not be available for each server that runs servlets).

It isnt too difficult to have a servlet-based generic SQL query tool.
Using JDBC, HTML form for user to input entire SQL statements
and html table to display any results back.

Is this what you want - user-supplied SQL statements in a big text field,
results back in browser?

Bye
Cezar

On Wed, 21 Apr 1999, Craig R. McClanahan wrote:

> Sam Rose wrote:
>
> > What about SQL plus for oracle?
> >
>
> Are you saying that you'd like to provide a web-based interface to SQL*Plus?  It
> gets a little interesting dealing with an interactive program, because of the
> stateless nature of HTTP.  Here's one general approach that might work.
>
> * The first time your servlet is invoked, use an
>   java.lang.Runtime.exec() to create a Process
>   object representing a connection to SQL*Plus
>   running in a separate process.
>
> * Stash the Process object in an HttpSession
>   so that the same user is returned to the same
>   Process every time.  (There will be one of these,
>   and one external process running SQL*Plus, for
>   each concurrent user).
>
> * On each request, call getOutputStream()
>   on the Process object and pass in the command.
>   Then, call getInputStream() and read
>   the response -- you'll have an interesting time
>   figuring out when it is finished -- maybe look
>   for the prompt string?
>
> * Format the response you've received in HTML,
>   and send it back to the user.
>
> * Provide some mechanism for shutting down the
>   external process when the user is done, or when
>   the session times out.
>
> Given all of this, wouldn't it just be easier to give the user a TELNET login so
> they can execute SQL*Plus themselves?
>
> Craig McClanahan
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>


Cezar Totth                             email:  [EMAIL PROTECTED]
                                        Fax:    (401) 220 33 95
Genesys Software Romania                Phone:  (401) 638 49 44
Stefan Furtuna 169, sect.6
cod 77171, Bucharest
Romania

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to