invalid parameter type error
- From: "Zhuo Li" <zli@xxxxxxxxxx>
- Date: Wed, 12 Mar 2008 13:38:17 -0400
I am using a TADOStoreProc which points to a function in Sybase ASA 9.0 with
integer type return value. The function is like this:
ALTER FUNCTION dbo.f_object_id( p1 CHAR(256), p2
CHAR(1) )
RETURNS INTEGER
I had the IDE to generate the TADOStoreProc's three parameters: p1, p2, and
f_object_id automatically. f_object_id has the integer type and
pdReturnValue. I call ExecProc, no problem. But when I try to retrieve the
return value using: Parameters.ParamByName('f_object_id').Value, I got
invalid parameter type error at one machine, however, it has no problem at
another different machine. Both machines use windows XP and odbc driver
dbodbc9.dll (version 9.0.2.3585).
To work around, I wrapped this function into a procedure like:
ALTER PROCEDURE dbo.sp_object_id(in p1 char(256),in p2 char(1), out
f_object_id integer)
BEGIN
SET f_object_id = f_object_id(p1, p2) ;
END
And then let the TADOStoreProc point to the procedure. It worked fine for a
while without any problem for both machines I tested before. However, today,
we find that one of our machines doesn't work with the procedure. This time,
it fails at ExecProc with invalid parameter type error. Now I switch back
and let the TADOStoreProc point to the function as the old way, it works
fine.
Any clue why?
Thanks, Zhuo
.
- Follow-Ups:
- Re: invalid parameter type error--more clues
- From: Zhuo Li
- Re: invalid parameter type error--more clues
- Prev by Date: Re: how to kick off a Delphi exe from a stored procedure?
- Next by Date: Re: invalid parameter type error--more clues
- Previous by thread: to list marked for deletion records
- Next by thread: Re: invalid parameter type error--more clues
- Index(es):