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

passing an ADODB parameter in a recordset into a Stored Procedure

$
0
0
I have a stored procedure called spPanLetterUpdate called in ADO in a VB6 app as seen here

Code:

   
 Set cn = New ADODB.Connection
    With cn
        .Open strConnectionString
        .Execute "spPanLetterUpdate", , adCmdStoredProc Or adExecuteNoRecords
        .Close
    End With


I wish to grab a parameter value in an update inline query just before it called fldNoteKey
as seen here so that Do While Not rs.EOF
the loop grabs the current value of the fldNotekey and places the parameter ready for use in the Stored Procedure.

the update can be seen here


Code:

    'Update existing note
        sql = "UPDATE tblNote SET fldNote = '" & _
        Replace(txtNote, "'", "''") & "' WHERE fldNoteKey = " & _
        rs(0)
       
        lngNoteKey = rs(0)

It has been awhile since I took a crack at VB6 at least 7 years or so how would I go about this ?

Viewing all articles
Browse latest Browse all 21238

Trending Articles



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