ADO call to user defined function
From: MS news (Me_at_SBrickey.net)
Date: 05/19/04
- Next message: WildHare: "Refresh DataTable"
- Previous message: Aaron Bertrand - MVP: "Re: General Advice: Multiple queries VS large joins"
- Next in thread: Val Mazur: "Re: ADO call to user defined function"
- Reply: Val Mazur: "Re: ADO call to user defined function"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 16:01:14 -0400
hello,
I recently decided that one of my stored procedures (which works fine) would
be better fit as a (scalar) user defined function. I used QA to move the
code, and tested, and it works fine. Unfortanately ASP feels differently, as
I get the error "Restricted data type attribute violation".
here is a snippet of the code...
AdoCom.CommandText = "GetPricingBranchProductCost"
AdoCom.CommandType = AdCmdStoredProc
AdoCom.Parameters.Append AdoCom.CreateParameter("@ProdID", AdBigInt,
AdParamInput, , ProdID)
AdoCom.Parameters.Append AdoCom.CreateParameter("@BrID", AdBigInt,
AdParamInput, , BrID)
Set AdoRS = AdoCom.Execute
it blows up on the .Execute
I was concerned that the CommandType would be incorrect, and tried other
values (&H0001 and &H0008, for text and unknown, seemed to work best; but
complained about lacking parameters) but have had no success.
from what little i've found about calling UDF's from within ADO, commandtype
SHOULD work as stored proc (though this may be wrong)...
but when the SQL code WAS a stored proc, i never got these errors.
Any ideas appreciated.
Thanks,
-Scott
- Next message: WildHare: "Refresh DataTable"
- Previous message: Aaron Bertrand - MVP: "Re: General Advice: Multiple queries VS large joins"
- Next in thread: Val Mazur: "Re: ADO call to user defined function"
- Reply: Val Mazur: "Re: ADO call to user defined function"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|