Page 1 of 1

Executing MSSQL function

Posted: Tue 15 Apr 2008 06:10
by Tomin
Hi,

I have a problem with executing MSSQL function.
I was trying MSStoredProc component but in a runtime it is showing me error of the execution:
"Line1: Invalid procedure number(0). Mustbe between 1 and 32767'

Have someone succeded to call functions with SDAC?

Tomin

Posted: Tue 15 Apr 2008 11:02
by Antaeus
Please provide some more information about the the error:
- the command text of your TMSSQL component;
- the exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- the exact version of your IDE;
- the exact version of SQL server and client. You can see it in the Info sheet of TMSConnection Editor.

Posted: Tue 15 Apr 2008 11:54
by Tomin
Antaeus wrote:Please provide some more information about the the error:
- the command text of your TMSSQL component;
- the exact version of SDAC. You can see it in the About sheet of TMSConnection Editor;
- the exact version of your IDE;
- the exact version of SQL server and client. You can see it in the Info sheet of TMSConnection Editor.
1.
I'm tying to use TMSStoredProc for calling a function. The SQL command text is:
{:RETURN_VALUE = CALL fn_Supervision_NewNo;0(:ProjectID)}

where
:ProjectID is a string
:RETURN_VALUE defined as a Result in the body of MSSQL function is also string value

2.
My current SDAC version is: 4.35.0.17

3.
I'm using Delphi 2007 with installed SP3

4. Sql Server info is as follow
Microsoft SQL Server: 09.00.3054
Microsoft SQL Native Client: 9.00.3042.00

Thanks for your help in advance

Tomin

Posted: Tue 15 Apr 2008 14:06
by Antaeus
You should remove the semicolon and zero symbols from the command to make it work:

Code: Select all

{:RETURN_VALUE = CALL fn_Supervision_NewNo (:ProjectID)}