VB.Net => Ado.Net = Stored Procedure 
Author Message
 VB.Net => Ado.Net = Stored Procedure

Hello Guys...

 Under VB.Net+Ado.Net (SqlClient) how do to get de value returned from a SP
 This is my SP

as

        Begin
                Return 1        -- Value already exists, Exit Function
        End
        Else
        Begin
                Return 0
        End

 Thankssssssssssssssss
  Genival - Japan



Mon, 21 Feb 2005 14:35:21 GMT  
 VB.Net => Ado.Net = Stored Procedure

Quote:
> Hello Guys...

>  Under VB.Net+Ado.Net (SqlClient) how do to get de value returned from a
SP
>  This is my SP

This demonstrates how to return the data from a SP to a datareader :

Private objCONN As SqlConnection
Private objCMD As SqlCommand
Public reader As SqlDataReader

objCONN = New SqlConnection(connection_string)
objCMD.Connection = objCONN

objCMD.CommandText = "spGLBCONExistsCountry"

reader = objCMD.ExecuteReader()

 While objDR.reader.Read
   debug.writeline(reader("fieldname"))
 End While

Hope it gives a clue

Allan



Mon, 21 Feb 2005 16:06:48 GMT  
 VB.Net => Ado.Net = Stored Procedure

Quote:

> objCMD.CommandText = "spGLBCONExistsCountry"

Sorry forgot one thing :

objCMD.CommandType = CommandType.StoredProcedure

Allan



Mon, 21 Feb 2005 16:09:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ASP.net VB.Net Stored Procedures in SQL Server

2. Stored Procedure and ADO.net Begin Transaction Code

3. ADO.NET with ASP.NET using VB.NET

4. ado.net to sql server store procedure

5. How to execute a Stored Procedure using ADO.Net

6. Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling

7. Seeking advice on VB6->ADO->SQL Stored Procedure Error Handling

8. Create Stored Procedures in VB.NET

9. VB.net and Stored Procedure

10. Getting Stored Procedure text with vb.net

11. VB.NET,SQL SERVER 2000 STORED PROCEDURE PARAMETERS, CRYSTAL REPORTS

12. VB.Net Stored Procedure Generation

 

 
Powered by phpBB® Forum Software