Board index » delphi » MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE

MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE

In MS SQL server i have created a stored procedure
something like this.

CREATE PROCEDURE hes_test AS
SELECT aonr.ti
FROM ti

as you can see, there is no arguments. Still, in params i get
RETURN_VALUE wich i guess is meant to bee the procedures status
response.

It does'nt matter what i try but i still get this response
when trying to access the proc.

*************************
'procedure hes_test has no parameters and arguments
were supplied'
*************************

I use the latest ODBC driver, everything else goes smooth.
I have the original release (unpatched) of Delphi.

Any suggestions would be most appreciated.

Magnus Hammar, 100441.2...@compuserve.com
Lustebo 40,
79020 Grycksbo, SWEDEN

 

Re:MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE


Quote
Magnus Hammar <100441.2...@compuserve.com> wrote:
>In MS SQL server i have created a stored procedure
>something like this.

>CREATE PROCEDURE hes_test AS
>SELECT aonr.ti
>FROM ti

>as you can see, there is no arguments. Still, in params i get
>RETURN_VALUE wich i guess is meant to bee the procedures status
>response.

>It does'nt matter what i try but i still get this response
>when trying to access the proc.

>*************************
>'procedure hes_test has no parameters and arguments
>were supplied'
>*************************

>I use the latest ODBC driver, everything else goes smooth.
>I have the original release (unpatched) of Delphi.

>Any suggestions would be most appreciated.

>Magnus Hammar, 100441.2...@compuserve.com
>Lustebo 40,
>79020 Grycksbo, SWEDEN

Try checking Null Value for the return Value parameter in the
Parameter Editor, it solved my problems.

Re:MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE


aja...@jabbar.demon.co.uk spake unto us:

Quote
>Try checking Null Value for the return Value parameter in the
>Parameter Editor, it solved my problems.

If I do this, Delphi tells me that I have too many parameters for the
stored procedure...

--------------------------------------
Greg Strauss, gstra...@islandnet.com
Victoria, BC, Canada

"...You can see the World from here!"
--------------------------------------

Re:MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE


In <820374466.18...@jabbar.demon.co.uk> aja...@jabbar.demon.co.uk
writes:
Quote

>Magnus Hammar <100441.2...@compuserve.com> wrote:

>>In MS SQL server i have created a stored procedure
>>something like this.

>>CREATE PROCEDURE hes_test AS
>>SELECT aonr.ti
>>FROM ti

>>as you can see, there is no arguments. Still, in params i get
>>RETURN_VALUE wich i guess is meant to bee the procedures status
>>response.

>>It does'nt matter what i try but i still get this response
>>when trying to access the proc.

>>*************************
>>'procedure hes_test has no parameters and arguments
>>were supplied'
>>*************************

>>I use the latest ODBC driver, everything else goes smooth.
>>I have the original release (unpatched) of Delphi.

>>Any suggestions would be most appreciated.

>>Magnus Hammar, 100441.2...@compuserve.com
>>Lustebo 40,
>>79020 Grycksbo, SWEDEN

>Try checking Null Value for the return Value parameter in the
>Parameter Editor, it solved my problems.

>------------------------------------------------

Since this procedure returns a result set, you can use TQuery to
execute it. Use Query.Open not Query.Execute. Params and return_values
do not work correctly with any release of BDE to date.

Re:MSSQL 6.0 Stored procedures %#¤ RETURN_VALUE


Quote
gstra...@islandnet.com (Greg Strauss) wrote:
>aja...@jabbar.demon.co.uk spake unto us:

>>Try checking Null Value for the return Value parameter in the
>>Parameter Editor, it solved my problems.

>If I do this, Delphi tells me that I have too many parameters for the
>stored procedure...

>--------------------------------------
>Greg Strauss, gstra...@islandnet.com
>Victoria, BC, Canada

>"...You can see the World from here!"
>--------------------------------------

I will check exactly what I did to solve the problem when I get to
work on 9 January. Sorry to have replied so late but I did not have
any time to download my usenet messages. :)

Other Threads