Walter A. March wrote: > ... location of javasettings_Windows_x86.xml in MS Windows
Thanks. The XML file content is included below. I am ignorant to determine whether there are settings relevant to OO Base connection in this XML file. I have conducted additional tests using OO Basic, based on examples illustrated by OO Developer Guide, Andrew Pitonyak, Andrew Jessen, Danad, and many others. Please accept my apology if I omitted anyone in reference. The test result in OO Basic is the same as that of OO BeanShell. Null object pointer is returned by the getConnection() call for OO HSQL DB files (embedded, or zip). The connection failure is identical for * script access from OO Calc (OO BeanShell, OO Basic), * script language (OO BeanShell, OO Basic), * GUI (OO Base Table section, OO Calc DSE), * new *.odb (no database/script), * old *.odb (containing intact database/script). My OO Basic test code is shown at the end of this message. There is NO failure for connection from OO Calc to the demo "biblio" database (not a HSQL DB) distributed in OO 2.0.3 package. The JDBC connection from a stand alone BeanShell to a stand alone HSQL DB file (not *.odb files) works as sepcified by java.sql.* modules. questions: * Can hackers implant virus code through this connection failure? * Are there tools or alternative debug modules for "com.sun.star.sdb" and "com.sun.star.sdbc" available to identify the origin of Null object pointer returned by getConnection()? Ray .. javasettings_Windows_x86.xml content <?xml version="1.0" encoding="UTF-8"?> <!--This is a generated file. Do not alter this file!--> <java xmlns="http://openoffice.org/2004/java/framework/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <enabled xsi:nil="true"/> <userClassPath xsi:nil="true"/> <vmParameters xsi:nil="true"/> <jreLocations xsi:nil="true"/> <javaInfo xsi:nil="false" vendorUpdate="2004-01-30" autoSelect="true"> <vendor>Sun Microsystems Inc.</vendor> <location>file:///C:/Program%20Files/Java/j2re1.4.2_07</location> <version>1.4.2_07</version> <features>0</features> <requirements>0</requirements> <vendorData>660069006C0065003A002F002F002F0043003A002F00500072006F006700720061006D00250032003000460069006C00650073002F004A006100760061002F006A0032007200650031002E0034002E0032005F00300037002F00620069006E002F0063006C00690065006E0074002F006A0076006D002E0064006C006C00</vendorData> </javaInfo> </java> .. OO Basic code to test connection from OO Calc to OO Base create a brand new junk.odb registration is irrelevant (connection failure either way) save and close create a brand new junk.ods go to the OO Basic code section go to the junk.ods section (not "My Macro") create a new module "junk_01" add the following OO Basic code in module "junk_01" customize the connection URL string as suggested in the code run the code in OO Basic IDE see same failure of Null pointer at getConnection() for OO HSQL DB files (*.odb) examine in OO Basic IDE as you wish the contents of DatabaseContext and DataSource objects REM ***** BASIC ***** Option Explicit rem reference: rem www.oooforum.org/forum/viewtopic.phtml?t=41997 rem OO Basic to connect DB through DataSource Sub dbDriverConnection dim oDBcntx as Object, oDBsrc as Object, oCnct as Object, oStmt as Object dim url_svc as String, url_dbs as String rem working settings url_svc = "com.sun.star.sdb.DatabaseContext" url_dbs = "file:///d:/junk.odb" url_dbs = "junk" url_dbs = "Bibliography" rem invalid settings url_dbs = "sdbc:embedded:hsqldb:file:///d:/junk.odb" rem test settings url_dbs = "file:///d:/junk.odb" oDBcntx = CreateUnoService( url_svc ) oDBsrc = ODBcntx.getByName( url_dbs ) oCnct = ODBsrc.getConnection( "", "" ) rem oStmt = oCnct.CreateStatement() rem oStme.executeQuery( sql_string ) rem oStmt.close() oCnct.close() oCnct.dispose() End Sub ________________________________________ PeoplePC Online A better way to Internet http://www.peoplepc.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
