Thank you for response. I desparately need to regain access to my *.odb data.
The explanation follows. Thanks. Ray
-----
abbreviation: OO = OpenOffice
reference:
www.oooforum.org/forum/viewtopic.phtml?t=41997
Macro-Calc-Base, OO Basic code to connect from OO Calc to OO Base
author: Drew Jensen
I was trying to duplicate in OO BeanShell the Calc to Base connection
as demonstrated by Drew Jensen in OO Basic.
I do not remember the exact details as OO BeanShell does not debug info.
The effort involves the following set of OO BeanShell statements,
in part and in full as I progressed through the trial.
-- HSQLDB JDBC driver from OpenOffice
-- sdbc_hsqldb.jar
-- com.sun.star.sdbcx.*
oDatabase = CreateUnoService("com.sun.star.sdb.DatabaseContext")
cnct = oDatabase.GetByName( "an OO registered DB" ).GetConnection( "sa", "" )
stmt = cnct.createStatement()
rslt = stmt.executeQuery( sql_string )
// print( rslt.getMetaData() );
// print( rslt.getString( col_name_string ) );
rslt.close();
stmt.close();
cnct.close();
I have previously successfully connected from within stand alone BeanShell to
a stand alone HSQLDB, using the following statements.
-- HSQLDB JDBC driver from www.hsqldb.org
-- hsqldb.jar
-- org.hsqldb.jdbcDriver
// BeanShell commands based on BeanShell own classloader and classpath
management
// addClassPath() getClassPath() getClass()
addClassPath( "d:/hsqldb/lib/hsqldb 1.8.0.5.jar" );
import org.hsqldb.*; // org.hsqldb.jdbcDriver, etc.
import java.sql.*; // DriverManager Connection Statement ResultSet
Class.forName( "org.hsqldb.jdbcDriver" ).newInstance();
print( Collections.list( DriverManager.getDrivers() ) );
Connection cnct;
Statement stmt;
ResultSet rslt;
cnct = DriverManager.getConnection( "jdbc:hsqldb:file:d:/tmp base/test", "sa",
"" );
// the remaining codes are very similar to those in OO BeanShell
One possibile culprit might be code mix-up during copy and paste.
It can be driver definition, can be classpath, etc.
It seems that OO maintains certain connection state info.
in global variables for entire OO,
not just for individual connection sessions.
Failure or mistakes of one connection session can affect the entire OO Base,
if this guess is correct.
________________________________________
PeoplePC Online
A better way to Internet
http://www.peoplepc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]