VB5, ADO 1.5, SQL Server 6.5 problem 
Author Message
 VB5, ADO 1.5, SQL Server 6.5 problem

We have been trying to obtain an output parameter from a stored procedure
in SQL Server (6.50.258) Service pak 3, using ADO 1.5 with VB 5.0 running
on Windows 95, without success. Below is the VB and SQL source code. We
appreciate any assistance you could offer.

Visual Basic 5.0

Private Sub cmdTestOutputParam_Click()

        Dim sOut As String
        Dim cmd As ADODB.Command
        Dim par As ADODB.Parameter

        Set cmd = New ADODB.Command
        Set par = New ADODB.Parameter

        cmd.ActiveConnection = cn
        cmd.CommandType = adCmdStoredProc
        cmd.CommandTimeout = 15
        cmd.CommandText = "sp_OutputTest"

        sOut = "2"

        Set par = cmd.CreateParameter("RetVal", adVarChar, adParamOutput, 1, sOut)
        cmd.Parameters.Append par

        cmd.Execute

        MsgBox (sOut)   ' THIS IS RETURNING A VALUE OF 2 IN sOut

End Sub

SQL SERVER 6.50.258  [sp_OutputTest]

if exists (select * from sysobjects where id =
object_id('dbo.sp_OutputTest') and sysstat & 0xf = 4)
                drop procedure dbo.sp_OutputTest
GO

CREATE PROCEDURE sp_OutputTet

AS
begin


end
go

Any help will be appreciated.

Arthur



Tue, 13 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB5, ADO 1.5, SQL Server 6.5 problem

2. ADO 1.5 - VB5.0 - SQL Server 6.5

3. VB5 / ADO 1.5 / SQL Server 6.5

4. SQL Server 6.5 + ADO problem...

5. VB5EE setup wizard and mdac 1.5 (ado 1.5) problem

6. Data objects closed error in ADO 2.1 and SQL server 6.5

7. sql server 6.5 ado error

8. ADO OLEDB SQL Server 6.5

9. Strange Behavior - ADO and SQL Server 6.5

10. ADO 2.0 connection to SQL Server 6.5

11. SQL Server 6.5 & VB6 ADO

12. Strange Behavior - ADO and SQL Server 6.5

 

 
Powered by phpBB® Forum Software