All Examples This Package
Class examples.jdbc.mssqlserver4.exsql
java.lang.Object
|
+----examples.jdbc.mssqlserver4.exsql
- public class exsql
- extends Object
This simple example shows how JDBC Extended SQL can be embedded
in standard SQL sent to the DBMS. Extended SQL is part of the
JDBC spec, and provides a DBMS-neutral way of using the many
secondary functions provided by any DBMS, but in a proprietary
syntax. The WebLogic JDBC drivers will convert extended SQL syntax
to the DBMS-specific syntax for the relevant function. Please see
our documentation for links to the complete Extended SQL specification.
This example is run on the command line and is output to
System.out.
Please note that this example uses a simple method for obtaining
result sets, update counts, and/or the output parameter values it may
generate. This is always possible with simple, known queries.
When executing complex or unknown possibly multi-statement SQL
or stored procedures, you should use the example in complexproc.java
to ensure that all results become available.
To set up this example:
- Set up your development shell as described in Package examples.jdbc.mssqlserver4.
- Change the database URL, login, and password connection
parameters to correspond to your Microsoft SQL Server
configuration. If you need more help, check
the section on connecting to a database in the Developers Guide, Using
WebLogic jDriver for Microsoft SQL Server.
- Compile this example by executing the following command in your development shell:
$ javac -d c:/weblogic/mssqlserver4/classes exsql.java
- Run this example by executing the following command in your development shell:
$ java examples.jdbc.mssqlserver4.exsql
-
exsql()
-
-
main(String[])
-
exsql
public exsql()
main
public static void main(String argv[]) throws Exception
All Examples This Package