Issue 4142 - mysql queries won't appear in documents
Summary: mysql queries won't appear in documents
Status: CLOSED DUPLICATE of issue 3045
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 641
Hardware: Other Windows 2000
: P3 Trivial (vote)
Target Milestone: ---
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-19 18:22 UTC by ingenstans
Modified: 2006-05-31 14:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2002-04-19 18:22:00 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.
Comment 1 ingenstans 2002-04-19 21:05:15 UTC
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
Comment 2 marc.neumann 2002-04-22 12:57:22 UTC
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
Comment 3 ingenstans 2002-04-22 14:45:27 UTC
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
Comment 4 ingenstans 2002-05-04 08:49:51 UTC
I have supplied more details -- see comment above. Issuezilla sometiems defeats me. I 
hadn't realised I was meant to reassign back. 
Comment 5 ingenstans 2002-06-26 11:04:41 UTC
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. 
Comment 6 Frank Schönheit 2002-09-09 10:05:30 UTC
just as a note: I believe that this is strongly related to issue 4811
(as you, Andrew, suggest), and thus to issue 3045.
Comment 7 marc.neumann 2002-10-16 13:42:04 UTC
duplicated to 3045

*** This issue has been marked as a duplicate of 3045 ***
Comment 8 marc.neumann 2002-11-29 13:33:02 UTC
close.because duplicate.
Comment 9 hans_werner67 2004-02-02 12:30:13 UTC
change subcomponent to 'none'