Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Call DTS package

2 posts in Objects Last posting was on 2004-08-12 22:29:28.0Z
Matjaz Justin Posted on 2004-08-09 10:41:55.0Z
From: "Matjaz Justin" <matjaz.justin@3tav.si>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Call DTS package
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 213.157.239.7
X-Original-NNTP-Posting-Host: 213.157.239.7
Message-ID: <411754f3$1@forums-1-dub>
Date: 9 Aug 2004 03:41:55 -0700
X-Trace: forums-1-dub 1092048115 213.157.239.7 (9 Aug 2004 03:41:55 -0700)
X-Original-Trace: 9 Aug 2004 03:41:55 -0700, 213.157.239.7
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7972
Article PK: 735243

I'm desperately seeking for syntax that will call DTS package from
Powerbuilder. Connect is OK, but I cannot find the right syntax for
LoadFromSQLServer function. I'm using Windows authentication.



From SQL BOL:

Package.LoadFromSQLServer ServerName, [ServerUserName], [ServerPassword], _
[Flags], [PackagePassword], [PackageGuid], [PackageVersionGuid], _
[PackageName], [pVarPersistStgOfHost]

Part Description
Package Expression that evaluates to an object in the Applies To list.
ServerName Server name.
ServerUserName Server user name.
ServerPassword Server user password.
Flags Value from the DTSSQLServerStorageFlags constants indicating
user authentication type.
PackagePassword Package password if the package is encrypted.
PackageGuid Package identifier, which is a string representation of a
globally unique identifier (GUID).
PackageVersionGuid Version identifier which is a string representation
of a GUID.
PackageName Package name.
pVarPersistStgOfHost Screen layout information associated with a
package (for internal use only).




Matjaz


Example:

oleobject objDTS
integer err, li_null

SetNull(li_null)

objDTS = create oleobject

if objDTS.ConnectToNewObject("DTS.package") <> 0 then
Messagebox("Error", "ConnectToNewOleObject")
return
else
MessageBox("Connect","OK!")
end if

err = objDTS.LoadFromSQLServer("MyServer", li_null, li_null, 256, li_null,
li_null, li_null, "MyPackageName", li_null)
MessageBox("LOAD", err)

err = objDTS.Execute
MessageBox("Execute", err)

destroy objDTS


Jason Lipman Posted on 2004-08-12 22:29:28.0Z
From: "Jason Lipman" <NOSPANjlipman@amexbf.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <411754f3$1@forums-1-dub>
Subject: Re: Call DTS package
Lines: 77
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 65.247.57.62
X-Original-NNTP-Posting-Host: 65.247.57.62
Message-ID: <411bef48$1@forums-1-dub>
Date: 12 Aug 2004 15:29:28 -0700
X-Trace: forums-1-dub 1092349768 65.247.57.62 (12 Aug 2004 15:29:28 -0700)
X-Original-Trace: 12 Aug 2004 15:29:28 -0700, 65.247.57.62
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7990
Article PK: 735260

I don't have the syntax handy at the moment, but I have called a DTS package
from a Bat file, and PB can call the bat file.

Hope that helps,

Jason

"Matjaz Justin" <matjaz.justin@3tav.si> wrote in message
news:411754f3$1@forums-1-dub...
>
> I'm desperately seeking for syntax that will call DTS package from
> Powerbuilder. Connect is OK, but I cannot find the right syntax for
> LoadFromSQLServer function. I'm using Windows authentication.
>
>
>
> From SQL BOL:
>
> Package.LoadFromSQLServer ServerName, [ServerUserName], [ServerPassword],
_
> [Flags], [PackagePassword], [PackageGuid], [PackageVersionGuid], _
> [PackageName], [pVarPersistStgOfHost]
>
> Part Description
> Package Expression that evaluates to an object in the Applies To
list.
> ServerName Server name.
> ServerUserName Server user name.
> ServerPassword Server user password.
> Flags Value from the DTSSQLServerStorageFlags constants indicating
> user authentication type.
> PackagePassword Package password if the package is encrypted.
> PackageGuid Package identifier, which is a string representation of
a
> globally unique identifier (GUID).
> PackageVersionGuid Version identifier which is a string
representation
> of a GUID.
> PackageName Package name.
> pVarPersistStgOfHost Screen layout information associated with a
> package (for internal use only).
>
>
>
>
> Matjaz
>
>
> Example:
>
> oleobject objDTS
> integer err, li_null
>
> SetNull(li_null)
>
> objDTS = create oleobject
>
> if objDTS.ConnectToNewObject("DTS.package") <> 0 then
> Messagebox("Error", "ConnectToNewOleObject")
> return
> else
> MessageBox("Connect","OK!")
> end if
>
> err = objDTS.LoadFromSQLServer("MyServer", li_null, li_null, 256, li_null,
> li_null, li_null, "MyPackageName", li_null)
> MessageBox("LOAD", err)
>
> err = objDTS.Execute
> MessageBox("Execute", err)
>
> destroy objDTS
>
>
>