Steve Cooper
2004-10-26 15:29:04 UTC
Could anyone tell me how to do use the mailmerge OpenDataSource function
from within powerbuilder.
In VB this works :
Word.Application.ActiveDocument.MailMerge.OpenDataSource(Name:="",
Connection:="DSN=testdsn;UID=testuid;PWD=testpwd", SQLStatement:="SELECT *
FROM PERSON", SQLStatement1:="")
If I try the same thing in Powerbuilder I get Error calling external object
function opendatasource .... :
obj_mail_merge.OpenDataSource("", "", "", "", "", "", "", "", "","","",
"DSN=testdsn;UID=testuid;PWD=testpwd", "SELECT * FROM PERSON", "")
obj_mail_merge contains the same path as the VB example.
It's probably to do with the empty parameters i'm using being incorrect, but
I've tried all the variations I can think off.
I can use obj_mailmerge.DataSource.Querystring to set the SQL, but I cannot
find away of setting the DSN this way.
Any help most appreciated.
Steve.
from within powerbuilder.
In VB this works :
Word.Application.ActiveDocument.MailMerge.OpenDataSource(Name:="",
Connection:="DSN=testdsn;UID=testuid;PWD=testpwd", SQLStatement:="SELECT *
FROM PERSON", SQLStatement1:="")
If I try the same thing in Powerbuilder I get Error calling external object
function opendatasource .... :
obj_mail_merge.OpenDataSource("", "", "", "", "", "", "", "", "","","",
"DSN=testdsn;UID=testuid;PWD=testpwd", "SELECT * FROM PERSON", "")
obj_mail_merge contains the same path as the VB example.
It's probably to do with the empty parameters i'm using being incorrect, but
I've tried all the variations I can think off.
I can use obj_mailmerge.DataSource.Querystring to set the SQL, but I cannot
find away of setting the DSN this way.
Any help most appreciated.
Steve.