Apache OpenOffice (AOO) Bugzilla – Issue 4142
mysql queries won't appear in documents
Last modified: 2006-05-31 14:29:06 UTC
according to the help file, you can drag a query from the data source view into a document, and it will automatically display the results. This works with the supplied bibliography database. However, when I do it with (simple, valid) query on an sql database, it shows the same dialog box and seems to be doing everything write. But the results never display, either as a table, or text.
I see on further investigation that this works in spreadsheets, in the most gratifying way. But it still doesn't work in writer documents. None the less, it's hugely impressive to see it dropping the data into a spreadsheet, which is of course very easy to format. I shall poke around with queries across tables, and check that they work. I need to get a proper bibliography database organised
Hi, I could not see any problem. I have used a mysql database and D&D works perfectly. Can you please give my a hint on your table & query struktur. Bye Marc
OK. I am using a database with four tables. Three of them are linked for collecting information about books and articles I quote: "authors", "quotes", and "sources". One ("cplace") is just a collection of interesting quotes imported from a flat file. I have a query built in the query designer, to find all quotes from a given author, and display them along with their sources. The text that the query editor displays if I turn off the designer is this: SELECT `authors`.`canonical_name`, `sources`.`Title`, `myquotes`.`quote`, `myquotes`.`page_no` FROM `sources` `sources`, `authors` `authors`, `myquotes` `myquotes` WHERE ( `sources`.`Author_ID` = `authors`.`auth_ID` AND `myquotes`.`book_id` = `sources`.`ID` ) AND ( ( `authors`.`canonical_name` LIKE :x ) ) I don't understand why some of these terms are doubled (in the 'FROM' section). But it works, which is the main thing. If I run it from the query designer, I get a box asking for my 'authors' parameters. I fill that out. Then I get the right answer in the query editor. If I drag the query into a spreadsheet, I get the same dialogue box, and then then correct answer is pasted into the spreadsheet. But if I try dragging the same query to a writer document, I get a dialogue box headed "Insert database columns"; and whatever I do or fill out, nothing is inserted after I press "OK". It certainly never gets to the stage of asking for parameters. I checked this out with the "ctable" table, which is just a flat file. If I select whole records from there in the table view, I can't drag and drop them into a write document: I get the same "Insert database columns" dialogue, and the same nothing happening when I press OK. But if I summon that dialog by pressing the little "data to text" icon, it works fine, even in a word document. And I just discovered that if I select my query without dragging it, I get the parameter request box as I should, and the results are delivered into the daa sources view. Again, I can't drag them successfully into a writer document, but the "data to text" icon does now work. So the refined specification of the bug is that in writer documents drag-and-drop of SQL queries does not work, becasue the "insert database columns" dialogue box doesn't seem to be connected to any action. But when the same dialog box is summoned from the "data to sext" icon, it works just fine. And in the spreadsheet, drag and drop from a query works exactly as it should, without the "insert database columns" dialogue appearing at all. Hope that helps
I have supplied more details -- see comment above. Issuezilla sometiems defeats me. I hadn't realised I was meant to reassign back.
I think this is related to Issue 4811 I say this with some trepidation, since there is an enormous thrash in that issue about whether it is the same as something else. Yet it does seem to me that I am talking about a similar problem: querying databases through ODBC does not work as the help file claims it should.
just as a note: I believe that this is strongly related to issue 4811 (as you, Andrew, suggest), and thus to issue 3045.
duplicated to 3045 *** This issue has been marked as a duplicate of 3045 ***
close.because duplicate.
change subcomponent to 'none'