-
syntax for calling stored function
Is the syntax for calling a stored function exactly the same as for calling
a stored procedure?
I have a stored procedure, and I can call it, but the stored function I cannot
call, the error message says that the procedure does not exist (true, because
it is a function, not a procedure). I know the function is there, because
it belongs to the same package body as the procedure, and I can list it in
SQL Plus.
The function returns a NUMBER, and I'm calling it like this.
(After filling up the command object's parameter collection):
objCommand.CommandText = "{call GetCount(?,?,?)}"
hits = objCommand.Execute
-
Re: syntax for calling stored function
Have you tried to qualify your calling statement with the package name?
e.g.
objCommand.CommandText = "{call PACKAGENAME.GetCount(?,?,?)}"
hits = objCommand.Execute
Levi
"Joar Vatnaland" <joar@synopsys.co.uk> wrote in message
news:132_3a5dd800$1@news.devx.com...
>
> Is the syntax for calling a stored function exactly the same as for
calling
> a stored procedure?
>
> I have a stored procedure, and I can call it, but the stored function I
cannot
> call, the error message says that the procedure does not exist (true,
because
> it is a function, not a procedure). I know the function is there, because
> it belongs to the same package body as the procedure, and I can list it in
> SQL Plus.
>
> The function returns a NUMBER, and I'm calling it like this.
> (After filling up the command object's parameter collection):
>
> objCommand.CommandText = "{call GetCount(?,?,?)}"
> hits = objCommand.Execute
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks