Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

how do you return a recordset value into a stored proc

$
0
0
Bear with me it has been awhile since I have used VB6 so this is a noob question BUT I would like to return a value in this case returning each individual account key per record/rowset of the the following SELECT statement.. eacxh account key would then be passed to a stored procedure as a parameter to be used there.

Sio I have my stored procedure spPanLetterUpdate

I have a shell I am working on to cobble this logic together , my connection string is set earlier somewhere outside this code block which connects to the same database, server , user name and password.

Code:

Dim con As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    Dim cmd As ADODB.Command


    Set Cmd = Server.CreateObject("ADODB.Command")


Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
sql  = "select fldTranKey, fldAccountKey,fldIncludeNotes,fldAppliedDate, fldNoteKey from dbo.tblTransDetail where
CONVERT(VARCHAR(10), fldAppliedDate, 101) = CONVERT(VARCHAR(10), getdate(), 101) "
    Connection.Open

      Set Cmd.ActiveConnection = Connection.Connection
      Cmd.CommandType = adCmdStoredProc
          cmd.CommandText = "dbo.spPanLetterUpdate"

      Cmd.Parameters.Refresh
    set rs = Cmd.Execute

    Do While Not rs.EOF
     

    loop


Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>