Changes

Jump to navigation Jump to search
110 bytes removed ,  20:00, 12 December 2010
no edit summary
exception with the error message will be thrown.</p>
<h2>==Usage</h2> ==
<p>The standard execution works as follows:</p>
 
#Create a new session instance with hostname, port, username and password.
#Call the <code>execute()</code> function of the session with the [[Commands|database commands]] as argument.
#Receive the result of a successfully executed command. As an error occurs an exception is thrown.
#Continue using the client (back to 2.), or close the session.
<ol start="1"> <li>Create a new session instance with hostname, port, username and password.</li> <li>Call the <code>execute()</code> function of the session with the <a href="commands">database command</a> as argument.</li> <li>Receive the result of a successfully executed command. As an error occurs an exception is thrown.</li> <li>Continue using the client (back to 2.), or close the session.</li> </ol> Example==
<h2>Example</h2> <ol start="1"> <li>#Create a session object:<br/> <codepre class="brush:java">Session session = new Session("localhost", 1984, "admin", "admin")</code></lipre> <li>#Run the command in question and print the textual result:<br/> <codepre class="brush:java">print session.execute("info database")</code></lipre> <li>#Close the session:<br/> <codepre class="brush:java">session.close()</code></li> </olpre>[[Category:Wikify]]
bueraucrat, Bureaucrats, editor, reviewer, Administrators
907

edits

Navigation menu