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.
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