db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r375715 - /db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
Date Tue, 07 Feb 2006 21:18:10 GMT
Author: davidvc
Date: Tue Feb  7 13:18:08 2006
New Revision: 375715

URL: http://svn.apache.org/viewcvs?rev=375715&view=rev
Log:
DERBY-387: Fix Simple Network Client sample to work correctly by fixing
database name.  Contributed by Rajesh Kartha

Modified:
    db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java

Modified: db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java?rev=375715&r1=375714&r2=375715&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java (original)
+++ db/derby/code/trunk/java/demo/nserverdemo/SimpleNetworkClientSample.java Tue Feb  7 13:18:08
2006
@@ -18,12 +18,16 @@
 
  */
 
-import java.sql.*;
-import java.lang.reflect.*;
-import javax.sql.DataSource;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.Properties;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
+
+import javax.sql.DataSource;
 
 /**
  * The primary purpose of this program is to demonstrate how to obtain
@@ -51,7 +55,7 @@
 	 * The database is located in the same directory where this program is being
 	 * run. Alternately one can specify the absolute path of the database location
 	 */
-	private static String DBNAME="NSSimpleDB";
+	private static String DBNAME="NSSampleDB";
 
 	/**
 	 * Derby network server port ; default is 1527
@@ -78,7 +82,7 @@
 	private static final String CS_NS_DBURL= "jdbc:derby:net://localhost:"+NETWORKSERVER_PORT+"/"+DBNAME+";retrieveMessagesFromServerOnGetMessage=true;deferPrepares=true;";
 
         // URL for the Derby client JDBC driver.
-        private static final String DERBY_CLIENT_URL= "jdbc:derby://localhost:"+ NETWORKSERVER_PORT+"/NSSampledb;create=true";
+        private static final String DERBY_CLIENT_URL= "jdbc:derby://localhost:"+ NETWORKSERVER_PORT+"/"+DBNAME+";create=true";
 
         // Default to using the Derby Client JDBC Driver for database connections
         String url = DERBY_CLIENT_URL;



Mime
View raw message