dbTalk Databases Forums  

sp_OA*

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss sp_OA* in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christian Weber
 
Posts: n/a

Default sp_OA* - 10-09-2003 , 06:13 AM






Hello!

How can i change the source and the target of a "transform data task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: sp_OA* - 10-09-2003 , 10:43 AM






Depends on how you have implemented them.

By far the easiest method is to make the package do the work. Have it read
from an INI file or a DB table but make the package do that. All the sp_OA*
does is run the package.

If you want you can assign the connections to be the values of Global
Variables in the package. In sp_OA* you will need to grab the
GlobalVariables Collection.

You can also manipulate the object model and fire it that way. You would
accesss the Connections collection.



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote

Quote:
Hello!

How can i change the source and the target of a "transform data task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris





Reply With Quote
  #3  
Old   
Christian Weber
 
Posts: n/a

Default Re: sp_OA* - 10-10-2003 , 12:56 AM



Thank you for your answer.

I have a SQLServer connection and a MSAccess conenctionin the DTS-Package.
How can i access the properties (for example to query the Initial catalog)
via sp_OAGetProperty?

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:%23UY%23SwnjDHA.2216 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Quote:
Depends on how you have implemented them.

By far the easiest method is to make the package do the work. Have it
read
from an INI file or a DB table but make the package do that. All the
sp_OA*
does is run the package.

If you want you can assign the connections to be the values of Global
Variables in the package. In sp_OA* you will need to grab the
GlobalVariables Collection.

You can also manipulate the object model and fire it that way. You would
accesss the Connections collection.



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm3ftc$ilc$1 (AT) news (DOT) mch.sbs.de...
Hello!

How can i change the source and the target of a "transform data task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris







Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: sp_OA* - 10-10-2003 , 08:16 AM



Here is how you would populate a GV through the object model in sp_OA*

EXEC @hr = sp_OASetProperty @DTSPkg,
'GlobalVariables("Source_ID").Value',@GV_IN_Source _ID


All you need to do is GET the right connection. Get it's Catalog Property



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote

Quote:
Thank you for your answer.

I have a SQLServer connection and a MSAccess conenctionin the DTS-Package.
How can i access the properties (for example to query the Initial catalog)
via sp_OAGetProperty?

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:%23UY%23SwnjDHA.2216 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Depends on how you have implemented them.

By far the easiest method is to make the package do the work. Have it
read
from an INI file or a DB table but make the package do that. All the
sp_OA*
does is run the package.

If you want you can assign the connections to be the values of Global
Variables in the package. In sp_OA* you will need to grab the
GlobalVariables Collection.

You can also manipulate the object model and fire it that way. You
would
accesss the Connections collection.



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm3ftc$ilc$1 (AT) news (DOT) mch.sbs.de...
Hello!

How can i change the source and the target of a "transform data task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris









Reply With Quote
  #5  
Old   
Christian Weber
 
Posts: n/a

Default Re: sp_OA* - 10-13-2003 , 01:15 AM



Hello,
i have a construct like this:

exec sp_OAGetProperty @pkg, 'Connections("server1")',@conn OUT
exec sp_OAGetProperty @conn,'Catalog',@datasource OUT

where @pkg,@conn and @datasource ar integer.

The first statement works, but on execting the second i get a "type
conflict" error.

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:unZ74CzjDHA.1676 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
Here is how you would populate a GV through the object model in sp_OA*

EXEC @hr = sp_OASetProperty @DTSPkg,
'GlobalVariables("Source_ID").Value',@GV_IN_Source _ID


All you need to do is GET the right connection. Get it's Catalog Property



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm5hmd$hu1$1 (AT) news (DOT) mch.sbs.de...
Thank you for your answer.

I have a SQLServer connection and a MSAccess conenctionin the
DTS-Package.
How can i access the properties (for example to query the Initial
catalog)
via sp_OAGetProperty?

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:%23UY%23SwnjDHA.2216 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Depends on how you have implemented them.

By far the easiest method is to make the package do the work. Have it
read
from an INI file or a DB table but make the package do that. All the
sp_OA*
does is run the package.

If you want you can assign the connections to be the values of Global
Variables in the package. In sp_OA* you will need to grab the
GlobalVariables Collection.

You can also manipulate the object model and fire it that way. You
would
accesss the Connections collection.



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm3ftc$ilc$1 (AT) news (DOT) mch.sbs.de...
Hello!

How can i change the source and the target of a "transform data
task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris











Reply With Quote
  #6  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: sp_OA* - 10-13-2003 , 01:21 AM



The value of the Catalog property - try changing to be a character datatype

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote

Quote:
Hello,
i have a construct like this:

exec sp_OAGetProperty @pkg, 'Connections("server1")',@conn OUT
exec sp_OAGetProperty @conn,'Catalog',@datasource OUT

where @pkg,@conn and @datasource ar integer.

The first statement works, but on execting the second i get a "type
conflict" error.

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:unZ74CzjDHA.1676 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Here is how you would populate a GV through the object model in sp_OA*

EXEC @hr = sp_OASetProperty @DTSPkg,
'GlobalVariables("Source_ID").Value',@GV_IN_Source _ID


All you need to do is GET the right connection. Get it's Catalog
Property



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm5hmd$hu1$1 (AT) news (DOT) mch.sbs.de...
Thank you for your answer.

I have a SQLServer connection and a MSAccess conenctionin the
DTS-Package.
How can i access the properties (for example to query the Initial
catalog)
via sp_OAGetProperty?

greets

chris

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:%23UY%23SwnjDHA.2216 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Depends on how you have implemented them.

By far the easiest method is to make the package do the work. Have
it
read
from an INI file or a DB table but make the package do that. All
the
sp_OA*
does is run the package.

If you want you can assign the connections to be the values of
Global
Variables in the package. In sp_OA* you will need to grab the
GlobalVariables Collection.

You can also manipulate the object model and fire it that way. You
would
accesss the Connections collection.



--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Christian Weber" <abc (AT) def (DOT) de> wrote in message
news:bm3ftc$ilc$1 (AT) news (DOT) mch.sbs.de...
Hello!

How can i change the source and the target of a "transform data
task"
in a named DTS-Package via StoredProcs "sp_OA*" within T-SQL?

Thanks a lot...


chris













Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.