dbTalk Databases Forums  

Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask

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


Discuss Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andreas.Bretl
 
Posts: n/a

Default Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-24-2004 , 08:54 AM






Hi all,
I try to implement the following in a DTS:
Executing a SQL-Task like the following:

SELECT ContactExists FROM BrainBase.DBO.IDP_CheckContactID(?)
(Table Function)

OR

SELECT BrainBase.DBO.IDP_CheckContactID(?)
(Function)


I want to write the result into a GlobalVariable but every time I click on
"Parameters" in the "Execute SQL Task" diaog I get an error telling me
something about "Syntax Error or Access Violation".

Is there a way to deal with what I plan to do?

And when is that Access Violation thrown (and why) because I get error like
that constantly whaich currently makes me look for workarounds. And as all
of you know, workarounds are not fullfilling

Any ideas are kindly appreciated,


Thanks a lot in advance


Andreas Bretl
bretl (AT) brainlab (DOT) com



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

Default Re: Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-24-2004 , 09:07 AM






The design time is more fragile than the runtime. If you do not like
workarounds then I doubt anyone can help much here. I can help with a
workaround though.

Global Variables and SQL statements in DTS
(http://www.sqldts.com/Default.aspx?205)

--
--

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


"Andreas.Bretl" <bretl (AT) brainlab (DOT) com> wrote

Quote:
Hi all,
I try to implement the following in a DTS:
Executing a SQL-Task like the following:

SELECT ContactExists FROM BrainBase.DBO.IDP_CheckContactID(?)
(Table Function)

OR

SELECT BrainBase.DBO.IDP_CheckContactID(?)
(Function)


I want to write the result into a GlobalVariable but every time I click on
"Parameters" in the "Execute SQL Task" diaog I get an error telling me
something about "Syntax Error or Access Violation".

Is there a way to deal with what I plan to do?

And when is that Access Violation thrown (and why) because I get error
like
that constantly whaich currently makes me look for workarounds. And as all
of you know, workarounds are not fullfilling

Any ideas are kindly appreciated,


Thanks a lot in advance


Andreas Bretl
bretl (AT) brainlab (DOT) com





Reply With Quote
  #3  
Old   
Andreas.Bretl
 
Posts: n/a

Default Re: Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-24-2004 , 09:22 AM



Hi Allan,
it seems that you are saving me another time
....the last tip was really great.

I will try to change the SQL Command of my task using an ActiveX.
Generally I am not against workarounds but sometimes I would just feel
better

But is it generally not possible to use User Defined Functions with
parameters?
If I hardcode the ID (replaced by parameter) it works fine.


Ok Allan,

Thanks a lot for your help, I really appreciate this,

Greetings from sunny Munich

Andreas Bretl
bretl (AT) brainlab (DOT) com



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

Default Re: Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-24-2004 , 10:26 AM



It is all in the design time config and this is fragile. It also has
problems with embedded ? in subqueries. Also not everything (driver)
supports ? either.



--
--

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


"Andreas.Bretl" <bretl (AT) brainlab (DOT) com> wrote

Quote:
Hi Allan,
it seems that you are saving me another time
...the last tip was really great.

I will try to change the SQL Command of my task using an ActiveX.
Generally I am not against workarounds but sometimes I would just feel
better

But is it generally not possible to use User Defined Functions with
parameters?
If I hardcode the ID (replaced by parameter) it works fine.


Ok Allan,

Thanks a lot for your help, I really appreciate this,

Greetings from sunny Munich

Andreas Bretl
bretl (AT) brainlab (DOT) com





Reply With Quote
  #5  
Old   
Andreas.Bretl
 
Posts: n/a

Default Re: Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-28-2004 , 01:39 AM



Allan,
I just wanted to say "thank you" for helping me out again
I really appreciate that people find the time to share their knowledge on a
base like it's provided in newsgroups.

You really helped me a lot

Greetings from Munich/Germany

....and seize the day,

Andy


Andreas Bretl
andreas.bretl (AT) brainlab (DOT) com



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

Default Re: Help desperately needed - UserDefinedFunctions with parameters in ExecuteSQLTask - 06-29-2004 , 04:29 AM



Mach's nichts



"Andreas.Bretl" <bretl (AT) brainlab (DOT) com> wrote

Quote:
Allan,
I just wanted to say "thank you" for helping me out again
I really appreciate that people find the time to share their knowledge on
a
base like it's provided in newsgroups.

You really helped me a lot

Greetings from Munich/Germany

...and seize the day,

Andy


Andreas Bretl
andreas.bretl (AT) brainlab (DOT) com





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.