diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 13:34:07 +0100 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 13:34:07 +0100 |
commit | e89e842175ca8bf8c5bb36636061c42743017dd9 (patch) | |
tree | 905a9dde1dde58c59a6ac7f2dd05f6abc7662f72 /odk | |
parent | 6a500920e5e34fc2ed5cd94e7d0b725f0d58b27b (diff) | |
parent | 1ae1f64e641d67a553eac4bcc91566efbe6a5d48 (diff) |
jsc340: merge to dev300m101
Diffstat (limited to 'odk')
-rw-r--r-- | odk/examples/DevelopersGuide/Database/CodeSamples.java | 42 | ||||
-rw-r--r-- | odk/util/check.pl | 12 | ||||
-rw-r--r-- | odk/util/makefile.pmk | 1 |
3 files changed, 14 insertions, 41 deletions
diff --git a/odk/examples/DevelopersGuide/Database/CodeSamples.java b/odk/examples/DevelopersGuide/Database/CodeSamples.java index 79b3405a4602..994e6e4f9b3d 100644 --- a/odk/examples/DevelopersGuide/Database/CodeSamples.java +++ b/odk/examples/DevelopersGuide/Database/CodeSamples.java @@ -151,33 +151,6 @@ public class CodeSamples if(xDriverManager != null) { // first create the needed url - String adabasURL = "sdbc:adabas::MYDB0"; - // second create the necessary properties - com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[] - { - new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE), - new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE) - }; - // now create a connection to adabas - con = xDriverManager.getConnectionWithInfo(adabasURL,adabasProps); - } - return con; - } - - // uses the driver manager to create a new connection and dispose it. - public static XConnection openToJDBC() throws com.sun.star.uno.Exception - { - XConnection con = null; - // create the DriverManager - Object driverManager = - xMCF.createInstanceWithContext("com.sun.star.sdbc.DriverManager", - xContext); - // query for the interface - com.sun.star.sdbc.XDriverManager xDriverManager; - xDriverManager = (XDriverManager)UnoRuntime.queryInterface(XDriverManager.class,driverManager); - if(xDriverManager != null) - { - // first create the needed url String url = "jdbc:mysql://localhost:3306/TestTables"; // second create the necessary properties com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[] @@ -186,7 +159,7 @@ public class CodeSamples new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE), new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE) }; - // now create a connection to adabas + // now create a connection to mysql con = xDriverManager.getConnectionWithInfo(url,props); } return con; @@ -198,7 +171,7 @@ public class CodeSamples XConnection con = null; // create the Driver with the implementation name Object aDriver = - xMCF.createInstanceWithContext("com.sun.star.comp.sdbcx.adabas.ODriver", + xMCF.createInstanceWithContext("org.openoffice.comp.drivers.MySQL.Driver", xContext); // query for the interface com.sun.star.sdbc.XDriver xDriver; @@ -206,15 +179,16 @@ public class CodeSamples if(xDriver != null) { // first create the needed url - String adabasURL = "sdbc:adabas::MYDB0"; + String url = "jdbc:mysql://localhost:3306/TestTables"; // second create the necessary properties - com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[] + com.sun.star.beans.PropertyValue [] props = new com.sun.star.beans.PropertyValue[] { new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE), - new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE) + new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE), + new com.sun.star.beans.PropertyValue("JavaDriverClass",0,"org.gjt.mm.mysql.Driver",com.sun.star.beans.PropertyState.DIRECT_VALUE) }; - // now create a connection to adabas - con = xDriver.connect(adabasURL,adabasProps); + // now create a connection to mysql + con = xDriver.connect(url,props); } return con; } diff --git a/odk/util/check.pl b/odk/util/check.pl index 0ba7f05a6ed2..6bf3fdd62b2f 100644 --- a/odk/util/check.pl +++ b/odk/util/check.pl @@ -265,17 +265,17 @@ if (-d "$StartDir") { "_typelib_InterfaceMethodTypeDescription","store","RegistryKey", "_typelib_Union_Init","_sal_Sequence","_typelib_Parameter_Init", "_typelib_TypeDescription","_uno_Environment", - "_typelib_InterfaceAttributeTypeDescription","uno_Context", + "_typelib_InterfaceAttributeTypeDescription", "_rtl_ModuleCount","_uno_ExtEnvironment", - "_typelib_IndirectTypeDescription","remote_DisposingListener", - "remote_Interface","Registry_Api","_oslFileStatus", + "_typelib_IndirectTypeDescription", + "Registry_Api","_oslFileStatus", "_typelib_InterfaceMemberTypeDescription","RegistryValueList", "RegistryTypeWriter_Api","_rtl_TextEncodingInfo", - "namespace_anonymous_1","remote_Connection", + "namespace_anonymous_1", "_oslVolumeInfo","_uno_Interface", "_typelib_InterfaceTypeDescription","_uno_Mapping","Registry", - "RegistryTypeReader_Api","remote_Context","_typelib_Uik", - "remote_InstanceProvider","_typelib_ArrayTypeDescription", + "RegistryTypeReader_Api","_typelib_Uik", + "_typelib_ArrayTypeDescription", "RegistryKeyArray","RegistryTypeReader","RegistryKeyNames", "RTConstValueUnion","_typelib_UnionTypeDescription","_uno_Any", "RegistryTypeWriter","_rtl_Locale","_typelib_CompoundMember_Init", diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk index 5e9662242957..39fea4880062 100644 --- a/odk/util/makefile.pmk +++ b/odk/util/makefile.pmk @@ -188,7 +188,6 @@ INCLUDETOPDIRLIST= \ $(INCOUT)/uno \ $(INCOUT)/cppu \ $(INCOUT)/cppuhelper \ - $(INCOUT)/bridges \ $(INCOUT)/registry \ $(INCOUT)/stl |