OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to: Migrate Base Projects to Multi-User
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
zazu
General User
General User


Joined: 06 Mar 2010
Posts: 37
Location: New Zealand

PostPosted: Thu Apr 01, 2010 10:35 pm    Post subject: Reply with quote

What I am saying is that when I open the database file - in this case Essential.odb - the autoexec macro runs, the main form opens as it should, but the underlying tables with all the data are not there. Therefore I cannot enter new data, run reports reports etc.

I minimise the form, click on tables in database objects view and this view is devoid of any tables

Click on query in database objects view, run a query - but get error message because the underlying data is not there.

Re backup - In tools > options there is a selection to create a backup and another to specify the path. With both of these selected however there is no backup created.

The script file resides in the same folder as the Start_HSQLDB_Server file as does the Essentia.properties file


[Edit]
I have four files in the folder - script, properties, one with the open office base icon (is this data?) and the fourth is a text file with no content. All of these files have the name "Essential" which is the database name. In summary:

Essential.txt Date Modified 30 March
Essential.OpenDocumentDatabase Date Modified 22 March
Essential.script file Date Modified 30 March
Essential.properties Date Modified 30 March

Also in the folder is the batch file that starts the server which I shut down with CTR+C

This is the content of the batch file

@echo off
set javapath=C:\Program Files\Java\jre6\bin\java.exe
set jarpath=C:\Program Files\OpenOffice.org 3\Basis\program\classes\hsqldb.jar
"%javapath%" -cp "%jarpath%" org.hsqldb.Server -database.0 file:Essential
exit

I have never seen a log file in the folder when the database was open, nor have I seen a file called backup

[Second Edit]
Now this is peculiar - I hit CTRL+C to shut the HSQLD server down. Then ran the batch file again and lo and behold when I opened the database everything was perfect

EXCEPT in the folder all the files are as per above still no log or backup files
Back to top
View user's profile Send private message
dacm
Super User
Super User


Joined: 07 Jan 2010
Posts: 769

PostPosted: Fri Apr 02, 2010 8:32 am    Post subject: Reply with quote

Okay, now I remember you used drag&drop of your (backend) tables as well as your front-end (.odb) components (forms, reports, queries and macros) during migration. That means you're using "memory tables" so the .data and associated .backup files will not exist because they are a function of "cached tables." Memory tables are just as persistent as cached tables, and always as fast or faster than cached tables, so I would recommend them anytime your database will fit into RAM on the computer running the HSQLDB server application. Just remember to make regular backups of your .script and .log files.

I've rewritten the note in the tutorial to reflect this clarification:

Note: The .script, .data, and .log files are critical to HSQLDB database backup and recovery because they make-up your database and should be backed-up regularly. The .data and associated .backup files will not exist if you use "memory tables" which is the default for HSQLDB. However, since OpenOffice creates "cached tables" by default, these files (.data and .backup) will exist when migrating to client-server using the zip-extration technique in step (2) above (and since "cached tables" are specified in the extracted .properties file). And finally, the .log file will not exist after a "proper" shutdown or "checkpoint" of the database (HSQLDB back-end components) which is accomplished by issuing (use: Tools > SQL... ) the SQL command: CHECKPOINT DEFRAG <or> SHUTDOWN COMPACT.

zazu wrote:
EXCEPT in the folder all the files are as per above still no log or backup files

Hmmm... No .log file is very odd. I get the .log file immediately upon starting the HSQLDB server application. And it should persist even when you stop the HSQLDB server if you've made any changes to the data without issuing a CHECKPOINT <defrag> or SHUTDOWN <compact> command before shutdown. But as I recall, you do issue the SHUTDOWN COMPACT command in your stop_HSQLDB_server script. CTRL-C is the same as pulling the power-plug on HSQLDB.

So that leads me to your sqltool.rc file. Are you sure the username and password are setup correctly? When I mess up my username or password in my sqltool.rc file I get greyed-out Table functions and no tables in Base. I would stop the HSQLDB server and verify by opening the computer task manager and shutdown Java if it exists, and start over with a clean start of HSQLDB server. The .log file should appear immediately in the same folder as the startup script.
Back to top
View user's profile Send private message
zazu
General User
General User


Joined: 06 Mar 2010
Posts: 37
Location: New Zealand

PostPosted: Fri Apr 02, 2010 1:19 pm    Post subject: Reply with quote

Thanks

I also resolved why the tables and data were not showing. Not sure hat caused the change, but the batch file starting the HSQLDB was starting up from the wrong folder. The batch file was in the start up folder whereas a shortcut pointing to the batch file should have been in the start up folder
Back to top
View user's profile Send private message
hwoehrle
General User
General User


Joined: 21 Sep 2009
Posts: 14
Location: Germany, Ulm

PostPosted: Thu Jun 17, 2010 7:05 am    Post subject: Reply with quote

Thanks for this great thread. But maybe ther are some important issues that should be mentioned in the first post:

H2:
- no subforms supported in newer versions (up to latest develompent releases) - or i'm too stupid to get it working...


MqSQL:
- no relations supported. All relations have to be entered manually with sql commands.
edit: Maybe i was to quick on this. Trying http://www.oooforum.org/forum/viewtopic.phtml?t=61027


So after more than 2 days of testing im back to zero Sad
Back to top
View user's profile Send private message
dacm
Super User
Super User


Joined: 07 Jan 2010
Posts: 769

PostPosted: Mon Jun 21, 2010 9:10 am    Post subject: Reply with quote

hwoehrle wrote:
H2:
- no subforms supported in newer versions (up to latest develompent releases) - or i'm too stupid to get it working...

Reply in another topic/thread here.
_________________
Soli Deo gloria
Tutorial: avoiding data loss with Base + Splitting 'Embedded databases'
Back to top
View user's profile Send private message
liherb
General User
General User


Joined: 19 Aug 2011
Posts: 38

PostPosted: Mon Dec 26, 2011 12:12 pm    Post subject: Reply with quote

dacm wrote:
I should have some time tomorrow to look at the "non-editable field properties" issue.

This is most likely a problem with the JDBC driver or a setting. I do have 'Edit > Database > Advanced Settings > Special Settings > Ignore the priviledges from the driver' checked (and tested un-checked). I'm simply using the "sa" username without a password on a //localhost/ connection as outlined by myself and sliderule in this tutorial. This particular issue is not associated with migration between embedded and server modes -- I'm using newly created database file-sets and new .odb front-end files.

Bottom line, no JDBC driven RDBMS server that I have tried will allow you to edit the field properties after saving a new table to the database using Base 3.1.1. I've tried HSQLDB (1.8 and 2.0RC8) and H2 (1.1.118). This is true of "CACHED" or "MEMORY" tables. I've even extracted the '.properties' file from an embedded HSQLDB 1.8 .odb file and replaced the existing HSQLDB server file (after appropriate naming) to no avail. In this case, the server-mode HSQLDB database had the exact same properties as Base expects with embedded databases including "cached" tables by default. As a test, I've also extracted the embedded database files in whole from an embedded database and run them client-server with the same "un-editable field properties" result. I can add or delete fields, add a new field while adjusting the properties, and add entire tables -- but once it is saved the properties are locked (grayed-out).

So the question is, why are JDBC-driven RDBMS server databases exhibiting locked field properties? Is this a driver issue (seems probable), a user permissions issue (seems unlikely), a Base setting (?), a database property setting (?), a connection or protocol issue (localhost vs separate computers?), or a bug in the Base front-end with respect to the JDBC driver interface (?).

Any ideas from the experts?


Hi dacm, I am encountering the same problem. This seems to NOT be related to migrating, since I am creating new databases. And it seems to NOT be related to the server mode as I am using the file mode.

Have you or anybody found the solution yet? Maybe this is why this thread is still not SOLVED.
Back to top
View user's profile Send private message
dacm
Super User
Super User


Joined: 07 Jan 2010
Posts: 769

PostPosted: Mon Dec 26, 2011 2:46 pm    Post subject: Reply with quote

liherb wrote:
...kindly give me a link to a solution to the issue that Base GUI is locked and not being able to edit table field properties?

We've concluded that its simply not a feature of the GUI when connected to an RDBMS using JDBC or ODBC. However, there are some GUI-based workarounds for most properties, and there's SQL commands a few others.

See the 4th link as quoted below from the Tutorial for the specifics...

[Tutorial] Avoid data loss by avoiding "Embedded databases" wrote:
Related posts (must reads) (in particular the one reference post at each link)
The Quick Fix - installers, setup steps, HSQLDB 2.x upgrade, etc. (this is it !!! - the "multi-mode database" solution) :super:
The Data Loss Problem (a quick primer)
Corrupted Base File Recovery Steps (as necessary; tedious and not always successful)
The Frozen 'Field Property' Workaround (when using Base to create/adjust Table structures; applies to all external databases)
The Migration of "Embedded databases" to "multi-mode" (as applicable)
Adjusting HSQLDB Cached Table Memory for Large Databases (>3 MB) (key if you're experiencing slow database response)
Adjusting Java Memory for Large Databases (>50 MB) (in conjunction with HSQLDB Cached Memory settings)
Automatic Database Backups or even versioning through [url=http://en.wikipedia.org/wiki/Dropbox_(service)]Dropbox[/url] or other cloud backup services (please consider)
Running a "multi-mode database" in a multi-user environment (MS Windows oriented steps with graphics)
Server Mode Startup, Shutdown and Authentication Options (Windows-specific discussion with wider application)
Client Computer Setup (when using 'server mode' with networked computers)

_________________
Soli Deo gloria
Tutorial: avoiding data loss with Base + Splitting 'Embedded databases'
Back to top
View user's profile Send private message
liherb
General User
General User


Joined: 19 Aug 2011
Posts: 38

PostPosted: Tue Dec 27, 2011 1:33 am    Post subject: Reply with quote

dacm wrote:

We've concluded that its simply not a feature of the GUI when connected to an RDBMS using JDBC or ODBC. However, there are some GUI-based workarounds for most properties, and there's SQL commands a few others.


Thanks dacm. By the way, do you think in next version of LibO / OOo this problem will be fixed? It's definitely on my wishlist.
Back to top
View user's profile Send private message
johnnysimmons
Newbie
Newbie


Joined: 24 Jan 2012
Posts: 3

PostPosted: Tue Jan 24, 2012 8:56 am    Post subject: Reply with quote

HSQL running on the server, and the completion of Step 2, I re-start the base. In the Database Wizard Step 1, I think I should choose the third option "Connect to an existing database" and leave it in the JDBC settings. In the next window "to establish a JDBC database connection" (wizard step 2) there are two empty boxes, I had to fill before I can continue, "data source URL JDBC:" and "JDBC driver class." These should be empty (remember, I did not pass 2E step 2a)? I should be in the "Data Source" box, type a DOS path of the file, the batch file to create? I have nothing, I should be in "JDBC driver class' box idea.



Moderation probe1: disabled signatur with SPAM link
Back to top
View user's profile Send private message
dacm
Super User
Super User


Joined: 07 Jan 2010
Posts: 769

PostPosted: Tue Jan 24, 2012 11:23 am    Post subject: Reply with quote

johnnysimmons wrote:
HSQL running on the server...

Sounds like you're setting up your local/client copy of Base to support HSQLDB running in 'server mode.' And your database is located on a separate server machine.

The "DOS path" to the database in the data-source URL is a 'file mode' consideration only. This "path" is not applicable to server mode. Instead, supply the IP address of the server machine in the data-source URL for 'server mode.' See the notes under the graphic at Step 3 for specifics of changing the '//localhost/' parameter to '//<IP address>/' of your server. 'Localhost' only works if you're running HSQLDB in 'server mode' on the same machine with Base. All multi-user setups will involve access to perhaps a central .odb file setup with a 'server mode' data-source URL which reflects the IP address (or network name) of the machine/server running HSQLDB in server-mode.

See also:
a recent string of posts on this subject
Running a "multi-mode database" in a multi-user environment (MS Windows oriented steps with graphics)
Server Mode Startup, Shutdown and Authentication Options (Windows-specific discussion with wider application)
Client Computer Setup (when using 'server mode' with networked computers)
_________________
Soli Deo gloria
Tutorial: avoiding data loss with Base + Splitting 'Embedded databases'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group