Re: How to establish an activeConnetion on launching Openoffice.org BASE with embedded HSQLDB
Fernand Vanrie <[email protected]> Fri, 04 Mar 2011 09:22:31 +0100
| Newsgroups | gmane.comp.openoffice.dba.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------040901030708060209080107
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Rik,
normaly for a OO-Dbase connectyed to MYSQL i use
oDB = CreateUnoService("com.sun.star.sdb.DatabaseContext")
if not oDB.hasbyname("OODbaseName")then
oDB.registerDatabaseLocation("mOODbaseName",converttoURL("Path to
OODbasename.odb")
endif
oConn = oDB.GetByName("OODbaseName").GetConnection("User","Password")
Hope it helps
Fernand
> Hello together,
> I'm new here, and i have a serious problem with my Base DB with
> embedded HSQLDB.
> I'm not shure, if the problem exists 'cause of my Hard- and Software
> combination or if it's a serious bug in Base.
> Using OOo 3.3-Base, Windows 7 and tryed out JRE 1.6.0_20/22/24 the
> problem exists with all of them:
> When launching Openoffice.org BASE with embedded HSQLDB and directly
> *open a form* or dialog *via basic macro*,
> *all inserted and changed datas are lost on closing the database
> document*.
> That means, opening a Form in code does work, and I can see the datas
> of the HSQLDB in the form.
> They also can be changed. Reopening the form via code shows the
> changed datas, i think they are written to cached tables, but not to
> the hard disk.
> By closing the database-document, all added or changed datas are lost.
>
> With xray I found out, that there is no "activeConnection" into HSQLDB
> established by opening forms or dialogs on this way.
> When i change once into "Table view", then
> "thisComponent.currentcontroller.activeConnection" can be seen with
> Xray, otherwise it's a "Null Object".
> In this case, all added and changed datas will be written to the
> embedded HSQLDB, nothing lost.
> Does anybody know, how to establish the "activeConnection" via Basic?
> Rik Hustede
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help
--------------040901030708060209080107
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Rik,<br>
<br>
normaly for a OO-Dbase connectyed to MYSQL i use<br>
<br>
oDB = CreateUnoService("com.sun.star.sdb.DatabaseContext")<br>
if not oDB.hasbyname("OODbaseName")then<br>
oDB.registerDatabaseLocation("mOODbaseName",converttoURL("Path to
OODbasename.odb")<br>
endif<br>
oConn =
oDB.GetByName("OODbaseName").GetConnection("User","Password")<br>
<br>
Hope it helps<br>
Fernand<br>
<blockquote cite="mid:5A2ABB1235B247419622F064D1640197@HustedePC"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.7600.16722">
<div><font size="2" color="#080000" face="Arial">Hello together,</font></div>
<div> </div>
<div><font size="2" color="#080000" face="Arial">I'm new here, and
i have a serious problem with my Base DB with embedded HSQLDB.</font></div>
<div><font size="2" color="#080000" face="Arial">I'm not shure, if
the problem exists 'cause of my Hard- and Software combination
or if it's a serious bug in Base.</font></div>
<div><font size="2" color="#080000" face="Arial">Using <font
size="2" color="#080000" face="Arial">OOo 3.3-Base, Windows
7 and tryed out JRE 1.6.0_20/22/24 the problem exists with
all of them:</font></font></div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
<div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">When launching Openoffice.org
BASE with embedded HSQLDB and directly <strong>open a
form</strong> or dialog <strong>via basic macro</strong>,
</font></font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><strong>all inserted and
changed datas are lost on closing the database document</strong>.</font></font></div>
</div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">That means, opening a Form in
code does work, and I can see the datas of the HSQLDB in the
form. </font></font>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">They also can be changed.
Reopening the form via code shows the changed datas, i
think they are written to cached tables, but not to the
hard disk.</font></font></font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">By closing the
database-document, all added or changed datas are lost.</font></font></font></div>
</div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><br>
With xray I found out, that there is no "activeConnection"
into HSQLDB established by opening forms or dialogs on this
way.</font></font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"> </font></font></div>
<div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">When i change once into
"Table view", t</font><font size="2" color="#080000"
face="Arial">hen
"thisComponent.currentcontroller.activeConnection" can
be seen with Xray, otherwise it's a "Null Object".</font></font></font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">In this case, all added and
changed datas will be written to the embedded HSQLDB,
nothing lost.</font></font></font></div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial"> </font></font></div>
</div>
<font size="2" color="#080000" face="Arial">
</font>
<div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
</div>
<div><font size="2" color="#080000" face="Arial"><font size="2"
color="#080000" face="Arial">Does anybody know, how to
establish the "activeConnection" via Basic?</font></font></div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
<div><font size="2" color="#080000" face="Arial">Rik Hustede</font></div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
<div><font size="2" color="#080000" face="Arial"> </font></div>
</blockquote>
<br>
</body>
</html>
--------------040901030708060209080107--