I am passing a parameter to a stored proce that will have the value of a
percent, like .068
Here is where I set it up:
Set prmPercent = .CreateParameter("Percent", adDecimal, adParamInput, , 0.5)
in the stored proc, I have
@.Percent dec(18,9),
When I run it, I get "Percision is Invalid" when it calls the proc. I can't
find much on it in Book on-line, or from searching this forum.
Do I have to set the @.Percent in the stored proc up differently?
Thanks,
SteveYou have to set precision and scale properties also.
Set prmPercent.Precision = 18
Set prmPercent.NumericScale = 9
AMB
"SteveInBeloit" wrote:
> I am passing a parameter to a stored proce that will have the value of a
> percent, like .068
> Here is where I set it up:
> Set prmPercent = .CreateParameter("Percent", adDecimal, adParamInput, , 0.
5)
> in the stored proc, I have
> @.Percent dec(18,9),
> When I run it, I get "Percision is Invalid" when it calls the proc. I can
't
> find much on it in Book on-line, or from searching this forum.
> Do I have to set the @.Percent in the stored proc up differently?
> Thanks,
> Steve|||I can't get that to compile, I used
Set prmPercent = .CreateParameter("Percent", adDecimal,
adParamInput, , 0.5)
Set prmPercent.Precision = 18
Set prmPercent.NumericScale = 9
I get "Invalid use of Properties" and it highlights the Set
prmPercent.Precision = 18 statement.
Any idea?
"Alejandro Mesa" wrote:
> You have to set precision and scale properties also.
> Set prmPercent.Precision = 18
> Set prmPercent.NumericScale = 9
>
> AMB
> "SteveInBeloit" wrote:
>|||Sorry, try:
with prmPercent
.Precision = 18
.NumericScale = 9
end with
AMB
"SteveInBeloit" wrote:
> I can't get that to compile, I used
> Set prmPercent = .CreateParameter("Percent", adDecimal,
> adParamInput, , 0.5)
> Set prmPercent.Precision = 18
> Set prmPercent.NumericScale = 9
> I get "Invalid use of Properties" and it highlights the Set
> prmPercent.Precision = 18 statement.
> Any idea?
>
> "Alejandro Mesa" wrote:
>|||AMB
THANK YOU VERY MUCH! That did it. I struggled with this quite some time
today.
Thanks again,
Steve
"Alejandro Mesa" wrote:
> Sorry, try:
> with prmPercent
> .Precision = 18
> .NumericScale = 9
> end with
>
> AMB
> "SteveInBeloit" wrote:
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment