VB 6.0 - how to call a stored procedure in SQL Server?

Asked By Ralph Acido on 27-Mar-06 08:48 PM
i have a program that will retrieve records from SQL server.. how i call these one using VB and by passing a parameter in the Procedure?

Here - Asked By Robbe Morris on 27-Mar-06 09:13 PM

http://www.eggheadcafe.com/articles/20030729.asp

link - Asked By Kevin Scott on 27-Mar-06 09:32 PM

Scroll to the code at the bottom of this page:

http://msdn.microsoft.com/library/?url=/library/en-us/architec/8_ar_da_0nxv.asp

try this - Asked By Amit Khurana on 28-Mar-06 03:16 AM

' Cmddata Is Command Object
'GoConn is ur connection string
 ' GuiGetHospitalname Stored Procedure name  
' "@retStatus" return value
' and u can pass parameters too to sp  
With cmddata
        .ActiveConnection = goConn
        .CommandText = "GuiGetHospitalname"
        .CommandType = adCmdStoredProc
        .CommandTimeout = 0
        .Parameters.Append .CreateParameter("@retStatus", adInteger, adParamReturnValue)
        Set rs = .Execute
        If .Parameters("@retStatus").value <> 0 Then
            MsgBox "Error in getting list of Hospital list"
            Me.MousePointer = vbDefault
            Set cmddata = Nothing
            Exit Sub
        End If
hi -check this - Asked By Rupali Randhave Kolhe on 28-Mar-06 04:26 AM
http://www.nigelrivett.net/VB/VBExecSPSimple.html

http://groups.google.co.in/group/microsoft.public.vb.database.ado/browse_thread/thread/a8698282121d7a7/2fa435f27e75a12e?lnk=st&q=call+stored+procedure+from+sql+server+in+vb&rnum=3&hl=en#2fa435f27e75a12e

http://experts.about.com/q/Visual-Basic-1048/Calling-MSSQL-Stored-Procedure.htm
How to call store procceudre in VB 6 - Gopi nathan replied to Ralph Acido on 16-May-08 05:41 AM

How to call store procceudre in VB 6.

I need how to call the Sql Store procceure in VB 6.0 with Example.

How should I create a generic stored procedure - Muhammad Ghous Mughal replied to Ralph Acido on 01-Jul-09 01:08 AM
How should I create a generic stored procedure in SQL2000 that is created once but saves data from every form in a vb6.0 project