Search found 1470 matches

by rudolfo
Mon Nov 14, 2016 2:00 am
Forum: Macros and UNO API
Topic: Using COM-object: how to connect to event
Replies: 2
Views: 1712

Re: Using COM-object: how to connect to event

You are using things like WScript in your macro code, which is a global object in the Windows Scripting Host environment. The classical language for COM objects is Microsofts Visual Basic. The Windows Scripting Host is the younger (and less capable) cousin of the Visual Basic. Apache OpenOffice is a...
by rudolfo
Sun Jan 24, 2016 3:11 am
Forum: Tables & Queries
Topic: [Solved] Update a field’s value from within a VBA macro
Replies: 3
Views: 5600

Re: how to update a field’s value from within a VBA macro

I spot the words DAO and recordset and you talk about a VBA macro in the subject. All this is indicating that you are working with Microsoft Office (DAO stands for Database Access Objects and is a (outdated) technology that Microsoft used with MS Access (see Wikipedia on Jet Data Access Objects and ...
by rudolfo
Fri Dec 04, 2015 2:55 am
Forum: Macros and UNO API
Topic: Faster traversal of text document
Replies: 8
Views: 2552

Re: Faster traversal of text document

I'm confident that any XML parser would be quicker than UNO (Universal Network Objects). This sounds evident because for each character a UNO object for a character style has to be created. So we have something that is slow (lets assume 80 milliseconds for this UNO object operation for a single cha...
by rudolfo
Mon Nov 30, 2015 3:42 am
Forum: Calc
Topic: Using a remote XML data source?
Replies: 2
Views: 1857

Re: Using a remote XML data source?

There is no easy way to get this done in OpenOffice. There are at least two steps required: Download the XML file from the URL Import the downloaded XML into Calc with the help of XSLT filters See the thread Data import from a website to get an idea what needs to be done. We can help you to get star...
by rudolfo
Sat Nov 28, 2015 1:41 am
Forum: Macros and UNO API
Topic: Insert HTML Text Into OpenOffice ODT File
Replies: 9
Views: 11533

Re: Insert HTML Text Into OpenOffice ODT File

Hm, this sounds easier than it actually it is. So if I got this correctly you want to paste something like <ul><li><b> bold text </b> and some less important </li> <li> another list item </li></ul> and you want to see the following in your Writer document: bold text and some less important another l...
by rudolfo
Thu Nov 26, 2015 2:01 am
Forum: Base
Topic: Using OpenOffice with MySQL
Replies: 1
Views: 1169

Re: Using OpenOffice with MySQL

The main purpose of OpenOffice Base is to operate as a link or a bridge to make tabular data (from databases, from csv files, from addressbooks of certain email clients) available to the Office applications Writer and Calc. For this reason Base can be used to read data very easily. There is a visual...
by rudolfo
Thu Sep 17, 2015 12:02 am
Forum: Tables & Queries
Topic: [Solved] Issues with linking two tables in Base
Replies: 3
Views: 1819

Re: Issues with linking two tables in Base.

Normally you would need to join the Barrels table with the Orders Table. But this cannot be done cleanly because you don't know if you should join it to Barrel_ID1 or Barrel_ID3 or Barrel_ID12. You would need something like ON b.barrel_ID IN (o.Barrel_ID1, o.Barrel_ID2,...o.Barrel_ID12) but this is ...
by rudolfo
Wed Sep 16, 2015 1:23 am
Forum: External Programs
Topic: Reading .ods Files with PHP?
Replies: 4
Views: 15108

Re: Reading .ods Files with PHP?

Have a look at SimpleXML and particularly at the first two user content examples that talk about converting an XML file/string into a PHP array. In your case you would need to feed the internal content.xml into simplexml_load_file() . And most probably it is best if you let do PHP the unzipping of t...
by rudolfo
Wed Mar 11, 2015 12:20 am
Forum: External Data Sources
Topic: [Solved] Opening and MS Access Database in AOO
Replies: 5
Views: 15585

Re: Opening and MS Access Database in Oo

changed the shortcut from <%windir%\System32\odbcad32.exe> to <%windir%\SysWOW64\odbcad32.exe> in both the ODBC souces (32 bit) and (64 bit) in turn. Some clarirfication is needed, because the path names that Microsoft has used for the 32bit subsystem on 64 bit windows machines is contrary to what ...
by rudolfo
Sun Mar 08, 2015 6:10 pm
Forum: Forms
Topic: SQL query not working when LibreBase connected to ORACLE
Replies: 1
Views: 1248

Re: SQL query not working when LibreBase connected to ORACLE

Oracle doesn't like the AS keyword in table aliases. It is okay with column aliases though. If you go to Edit->Database->Advanced Settings you can configure this for each database connection. The deactivation of table aliases (as seen in the screenshot) was sometimes ignored (I think the queries tha...
by rudolfo
Sun Mar 08, 2015 5:56 pm
Forum: Tables & Queries
Topic: [Solved] Odd behaviour in Base Query with Wildcards
Replies: 1
Views: 1389

Re: Odd behaviour in Base Query with Wildcards

The handling of character data is complicated in databases. As you have said CHAR type data will be padded, but there are also some database engines that automatically remove the padding when the CHAR column is used with certain operators. This typically happens for the equality comparison (where na...
by rudolfo
Fri Mar 06, 2015 3:00 am
Forum: Base
Topic: When is a User input request being processed?
Replies: 6
Views: 1542

Re: When is a User input request being processed?

Out of curiosity I had to verify the substitution of placeholders for Oracle and JDBC drivers. If I create a main form and a subform (both based on a table on their own), the classical master-detail forms I can see in the statement cache of the Oracle Database: SELECT * FROM "A_USER"."...
by rudolfo
Thu Mar 05, 2015 11:41 pm
Forum: External Programs
Topic: Develop UNO Program by cpp IDE
Replies: 3
Views: 2980

Re: Develop UNO Program by cpp IDE

Actually I am only a user of OpenOffice. Though I work as software developer I don't do any cpp development for Openoffice. My general experience with development project is that you can always get them integrated if you don't fear hand-crafting your project files. Usually all tools have options to ...
by rudolfo
Thu Mar 05, 2015 1:47 am
Forum: External Programs
Topic: Develop UNO Program by cpp IDE
Replies: 3
Views: 2980

Re: Develop UNO Program by cpp IDE

According from what I know about Eclipse it can integrate third party (read as Open Office) Makefiles or generate Makefiles on each one (using some standard (and configurable) rules. The CDT can generate a makefile for you, such projects are called Managed Make projects. Some projects, known as Stan...
by rudolfo
Thu Mar 05, 2015 1:35 am
Forum: Base
Topic: When is a User input request being processed?
Replies: 6
Views: 1542

Re: When is a User input request being processed?

So when you use any bind value like :Surename that is handled by Base before Base hands over the query to the database. I wouldn't be 100% sure about this. Mainly because Base supports quite a lot backend database engines, some of them even with different drivers (native, JDBC, ODBC, ...). Any dece...
by rudolfo
Wed Mar 04, 2015 1:48 am
Forum: Macros and UNO API
Topic: Server side OpenOffice Automation error
Replies: 1
Views: 1665

Re: Server side OpenOffice Automation error

Can't say this for sure, because I have used Server 2008 R2 only rarely. But you should at least check and verify the following areas: 64bit vs 32bit if you start JScript in a 64bit environment chances are that you won't be able to the 32bit UNO objects of OpenOffice. (If your Windows 7 runs on a 64...
by rudolfo
Thu Feb 19, 2015 1:43 am
Forum: Base
Topic: Data query in extra window?!
Replies: 3
Views: 1201

Re: Data query in extra window?!

It seems like you haven't fully understood the idea behind this queries?! They are not meant as a interactive tool (like a shell or terminal) but are intended to be designed once but then later on used many times. Of course that why you usually save them. You want to reuse them at the next day. What...
by rudolfo
Thu Feb 19, 2015 1:16 am
Forum: Macros and UNO API
Topic: [Solved] How to mass export certain sheet to CSV?
Replies: 6
Views: 13595

Re: How to mass export certain sheet to CSV?

The steps that you need to do are: List all the files in a certain directory . Depending wether all files are located flat in a single directory or if you also have subfolders the way to do it is different. (see Using Shell in Base to Execute Linux Commands ) Loop through the list of found spreadshe...
by rudolfo
Tue Feb 17, 2015 12:47 am
Forum: Macros and UNO API
Topic: [Solved] How to mass export certain sheet to CSV?
Replies: 6
Views: 13595

Re: How to mass export certain sheet to CSV?

My installation of OpenOffice Apache OpenOffice 3.4.1 installed a Javascript macro into the folder <open-office-install-path>/Basis/share/Scripts/javascript/ExportSheetsToHTML . Right, it looks more complicated then it should be. But it gives you the right concept: "Hide all other sheets and ex...
by rudolfo
Fri Feb 13, 2015 3:34 am
Forum: Macros and UNO API
Topic: [Calc] Automatically logging COM data
Replies: 4
Views: 2278

Re: [Calc] Automatically logging COM data

As you were wondering about the differences between DDE and macros here is what Wikipedia says about DDE: In computing, Dynamic Data Exchange (DDE) is a method of interprocess communication under Microsoft Windows or OS/2. It allows one program to subscribe to items made available by another program...
by rudolfo
Fri Feb 13, 2015 2:53 am
Forum: Macros and UNO API
Topic: [Solved] How to call calc built in functions?
Replies: 15
Views: 14981

Re: [solved] How to call calc built in functions?

I have to admit, I did not test my code from my last post. It just seemed to be what is expected by the API. Obviously it is not. For the records I gave it another go with the .getDataArray() method of the XCellRange interface. At least the name of the method seems to promise that an array is return...
by rudolfo
Tue Feb 10, 2015 10:22 pm
Forum: Macros and UNO API
Topic: [Solved] How to call calc built in functions?
Replies: 15
Views: 14981

Re: How to call calc built in functions?

::com::sun::star::table::XCellRange for a SheetCellRange object that contains the data. this means the second parameter should be a CellRange , not a string that specifies a cell range. So you better try: Dim oFunctionAccess As Object Dim oSheet As Object, oRange As Object oFunctionAccess = createU...
by rudolfo
Tue Feb 10, 2015 1:03 am
Forum: Base
Topic: [Solved] OO Base Macro error?
Replies: 3
Views: 1378

Re: OO Base Macro error?

As the error message says something about a .odb.log file in a SQLite subdirectory I am assuming that you are using a SQLite database as Backend in your .odb file? Correct us if this assumption is wrong. SQLite is more like a single user database, at least its locking mechanism is not optimized for ...
by rudolfo
Tue Feb 10, 2015 12:45 am
Forum: Base
Topic: [Solved] Failure ? no Java JRE??
Replies: 4
Views: 1870

Re: Failure ? no java jre??

If you are really still running OpenOffice.org 3.3 as your signature is saying, I would doubt that you had a working environment with JRE 8 (1.8). Unfortunately the update procedure of Sun/Oracle Java has become strange. I just experienced this last week, when I did a manual Java Update. It asked me...
by rudolfo
Sat Feb 07, 2015 4:43 am
Forum: Base
Topic: [Solved] Connect to database with SQL
Replies: 6
Views: 2787

Re: Connect to database with SQL

As you mentioned port 3306 I assume that you are running a MySQL database server. port is forwarded in modem db name user password i have verified over and over.. driver loads.. When it tries to connect the error is packet sent none recieved. How did you verify the username and password? Did you use...
by rudolfo
Thu Feb 05, 2015 2:35 pm
Forum: External Programs
Topic: Using SDK inside a 64 application (C++, Windows)
Replies: 5
Views: 5612

Re: Using SDK inside a 64 application (C++, Windows)

The OpenOffice COM Automation doesn't come with a type lib. It only supports late binding. No intellisense or any of the nice IDE features available. But this doesn't matter. Any of the available interfaces is simply a wrapper around the core UNO objects. Most of them have the phrase bridge in their...
by rudolfo
Wed Feb 04, 2015 1:59 am
Forum: Macros and UNO API
Topic: Excel upload to MYSQL workbench through macros
Replies: 1
Views: 1015

Re: excel upload to MYSQL workbench through macros

An answer to this question has been given in another thread, that was unfortunately hijacked for this purpose. Please read the Survival Guide why this is not a good idea and actually a bad habit.
by rudolfo
Wed Feb 04, 2015 1:45 am
Forum: Base
Topic: [Solved] CONCAT Error - "Column Not Found"
Replies: 2
Views: 1267

Re: CONCAT Error - "Column Not Found"

As I am reluctant to read SQL code that is optimized for machines and not for humans (consists of 30 or more percent of quotes and the SQL keywords like SELECT, FROM or WHERE are hard to spot) I can only make a guess. You are using a nested CONCAT , but MySQL supports a CONCAT(string1, string2, ...)...
by rudolfo
Wed Feb 04, 2015 1:21 am
Forum: External Programs
Topic: Using SDK inside a 64 application (C++, Windows)
Replies: 5
Views: 5612

Re: Using SDK inside a 64 application (C++, Windows)

Do you mean I should create a 32 bit application (separate process) which used the SDK. And then I communicate with this process via... TCP? You got it. As you mentioned you can't call a function in a 32bit DLL from within a 64bit process. But calling functions that can be dynanmically loaded into ...
by rudolfo
Tue Feb 03, 2015 2:25 am
Forum: Macros and UNO API
Topic: Insert HTML Text Into OpenOffice ODT File
Replies: 9
Views: 11533

Re: Insert HTML Text Into OpenOffice ODT File

I guess the missunderstadning is in the following lines of your code: string docText = "<b>This will</b> be my first paragraph.\n\r"; docText += "This will be my second paragraph.\n\r"; ((XTextDocument)oDoc).getText().setString(docText); You are passing the plain string docText t...