Issue 113118 - macro with mailmerge & mysql trows last DB row
Summary: macro with mailmerge & mysql trows last DB row
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2010-07-13 10:34 UTC by edonia
Modified: 2017-05-20 11: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 edonia 2010-07-13 10:34:36 UTC
I'm working with OOo 3.2.0 on ubuntu 10.04 and mysql 5.1.41

I have a macro with the following code:

Sub serienbrief
	Dim MailMerge as Object
	Dim DocumentURL as String

	MailMerge = createunoservice("com.sun.star.text.MailMerge")
	Mailmerge.DataSourceName="db-cn-mysql"
	MailMerge.DocumentURL=ConvertToUrl("/path_to_doc/mydoc.ott")
	MailMerge.CommandType=1
	MailMerge.Command="my query"
	MailMerge.OutputType=3
	MailMerge.Subject="my subject"
	MailMerge.AddressFromColumn="email"
	MailMerge.SendAsAttachment=0
	MailMerge.execute(Array())
	MailMerge.Dispose() 
End Sub

The database is an mysql DB, the connector mysql(native).

If I run this basic, the last row from the DB are not used. If I do open the
query, all entries of the query are shown. If I do send a mailmerge, with the
GUI, all entries in the query get an mail. Using this marco, all entries except
the last in the query get an email.
Comment 1 kay.ramme 2010-11-04 14:31:15 UTC
Ocke, please have a look.
Comment 2 ocke.janssen 2010-11-04 15:31:46 UTC
Could you please have a look at it or delegate it? Thanks. I don't know who is
responsible for that.
Comment 3 Oliver Specht 2010-11-05 09:41:47 UTC
->edonia: To find the reason it would be helpful if you could provide some
additional information. 
- Instead of output to email try to output to file (needs OutputType=1, and
OutputURL set). Does this resulting file contain all entries?
- If the former works try with SaveAsSingleFile = True. 
- If both fail try to use the bibliography data as data source. 
Comment 4 Marcus 2017-05-20 11:29:44 UTC
Reset assigne to the default "issues@openoffice.apache.org".