dbTalk Databases Forums  

Calling stored procs from dynamics properties task

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


Discuss Calling stored procs from dynamics properties task in the microsoft.public.sqlserver.dts forum.



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

Default Calling stored procs from dynamics properties task - 11-10-2003 , 06:35 PM






I am running into some problems and have no idea how to go
around this - i know it must be possible... i am using
SQL 2K

i want to set my global variables based on results from my
stored proc. in dynamic properties task i add a property
(global variable) and i choose query and i put the name of
my stored proc and a param to it (which is another global).

pGetResults id

That does nothing... I heard you have to put ? so I try

pGetResult ?id -> nothing

pGetResult 10 -> nothing

when i run pGetResult from Query Analyzer I get the
result. So, i save that as a query to see if I could
browse to it and get the result. Still nothing.

What in the world am I doing wrong???

Thanks,
Branka

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

Default Re: Calling stored procs from dynamics properties task - 11-11-2003 , 04:29 AM






I do not know that you can do that i.e. use the ? in this task. Where do
you map the Global Variable to the ? ?

I would use an ExecuteSQL task to do this an assign the values in an Active
Script task.

You can assign the results of your Queries with a ? to an output rowset and
then assign that to your package properties.

--

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


"branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am running into some problems and have no idea how to go
around this - i know it must be possible... i am using
SQL 2K

i want to set my global variables based on results from my
stored proc. in dynamic properties task i add a property
(global variable) and i choose query and i put the name of
my stored proc and a param to it (which is another global).

pGetResults id

That does nothing... I heard you have to put ? so I try

pGetResult ?id -> nothing

pGetResult 10 -> nothing

when i run pGetResult from Query Analyzer I get the
result. So, i save that as a query to see if I could
browse to it and get the result. Still nothing.

What in the world am I doing wrong???

Thanks,
Branka



Reply With Quote
  #3  
Old   
branka
 
Posts: n/a

Default Re: Calling stored procs from dynamics properties task - 11-12-2003 , 01:27 PM



Thanks for clarifying - I was running into problems
because I have both MSSQL 2000 and 7 installed on my
machine .

I will have to set my globals via Execute SQL task which
is too bad - i wanted to set them in dynamic properties
task by calling specific stored procs (with the global
passed as a param).

It seems like there is a problem with that - I get the
error msg saying "error converting type nvarchar to int".
I am trying to do this
pGetData iGlobalVar
looks like it is taking iGlobalVar as string and not the
value of it.

I also want to set queries based on pGetQuery iGlobalVar,
so if you know of a way to do that work around, I would
rally appreciate it.

Thanks,
Branka





Quote:
-----Original Message-----
I do not know that you can do that i.e. use the ? in this
task. Where do
you map the Global Variable to the ? ?

I would use an ExecuteSQL task to do this an assign the
values in an Active
Script task.

You can assign the results of your Queries with a ? to an
output rowset and
then assign that to your package properties.

--

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


"branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:06c301c3a7eb$bbf318d0$a101280a (AT) phx (DOT) gbl...
I am running into some problems and have no idea how to
go
around this - i know it must be possible... i am using
SQL 2K

i want to set my global variables based on results from
my
stored proc. in dynamic properties task i add a
property
(global variable) and i choose query and i put the name
of
my stored proc and a param to it (which is another
global).

pGetResults id

That does nothing... I heard you have to put ? so I try

pGetResult ?id -> nothing

pGetResult 10 -> nothing

when i run pGetResult from Query Analyzer I get the
result. So, i save that as a query to see if I could
browse to it and get the result. Still nothing.

What in the world am I doing wrong???

Thanks,
Branka


.


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

Default Re: Calling stored procs from dynamics properties task - 11-12-2003 , 08:29 PM



Use CAST(col as INTEGER)?

--

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


"branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for clarifying - I was running into problems
because I have both MSSQL 2000 and 7 installed on my
machine .

I will have to set my globals via Execute SQL task which
is too bad - i wanted to set them in dynamic properties
task by calling specific stored procs (with the global
passed as a param).

It seems like there is a problem with that - I get the
error msg saying "error converting type nvarchar to int".
I am trying to do this
pGetData iGlobalVar
looks like it is taking iGlobalVar as string and not the
value of it.

I also want to set queries based on pGetQuery iGlobalVar,
so if you know of a way to do that work around, I would
rally appreciate it.

Thanks,
Branka





-----Original Message-----
I do not know that you can do that i.e. use the ? in this
task. Where do
you map the Global Variable to the ? ?

I would use an ExecuteSQL task to do this an assign the
values in an Active
Script task.

You can assign the results of your Queries with a ? to an
output rowset and
then assign that to your package properties.

--

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


"branka" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:06c301c3a7eb$bbf318d0$a101280a (AT) phx (DOT) gbl...
I am running into some problems and have no idea how to
go
around this - i know it must be possible... i am using
SQL 2K

i want to set my global variables based on results from
my
stored proc. in dynamic properties task i add a
property
(global variable) and i choose query and i put the name
of
my stored proc and a param to it (which is another
global).

pGetResults id

That does nothing... I heard you have to put ? so I try

pGetResult ?id -> nothing

pGetResult 10 -> nothing

when i run pGetResult from Query Analyzer I get the
result. So, i save that as a query to see if I could
browse to it and get the result. Still nothing.

What in the world am I doing wrong???

Thanks,
Branka


.




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.