|
-
Dec 19th, 2024, 07:54 AM
#5
Re: ADODB Command - Now Populating paramteters automatically!?
 Originally Posted by simonm
Code:
Set cmUpdate = New command
Set cmUpdate.ActiveConnection = cnSource
cmUpdate.CommandType = adCmdStoredProc
cmUpdate.CommandTimeout = 120
cmUpdate.CommandText = strProcName
cmUpdate.Parameters.Append cmUpdate.CreateParameter("ReturnValue", adInteger, adParamReturnValue)
cmUpdate.Parameters.Append cmUpdate.CreateParameter("ID", adInteger, adParamInput, , rsSource(strKeyName))
cmUpdate.Parameters.Append cmUpdate.CreateParameter("LastRead", adBinary, adParamInput, 8, rsSource!LastUpdate_ts)
cmUpdate.Parameters.Append cmUpdate.CreateParameter("Result", adInteger, adParamOutput)
As soon as the line in red is executed, the parameters are now fully populated automatically. So the later parameter creation code just duplicates them.
No code changes and no changes to SQL Server recently (that I am aware of)...
Sounds like a leftover
Check the Paremeters-Collection BEFORE executing your red line
Is it empty? Check the Count-Property
And try:
Set cmUpdate = Nothing as the first line (before setting it to a New Command)
Last edited by Zvoni; Tomorrow at 31:69 PM.
----------------------------------------------------------------------------------------
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------------------
People call me crazy because i'm jumping out of perfectly fine airplanes.
---------------------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|