Adding ADO Parameters using ParamArray

Results 1 to 2 of 2

Thread: Adding ADO Parameters using ParamArray

  1. #1
    Join Date
    Dec 1969

    Default Adding ADO Parameters using ParamArray

    At any given time we will all come to the stage where getting data they usual way is not effiecient enough. In VB6 Using ADO you could use similar code to the following to run through a parameter array:<BR><BR> For x = 0 To UBound(vParamArray)<BR> adoCommand.Parameters(x + 1).Value = vParamArray(x)<BR> Next x<BR> <BR> Set strStoredProc = adoCommand.Execute<BR><BR>Which would return / Update / Add / Delete our data, all we would need to do is make sure that we follow the correct order of parameters in the SQL SP. In .NET however I have found that this method doesn&#039;t work anymore, not without exact param Names (Although they now don&#039;t need to be in the correct order)! <BR><BR>Is there a way to run a Stored Procedure, adding the Parameter values as the code above in .NET without having to do all the extra work?

  2. #2
    Join Date
    Dec 1969

    Default Application Block

    Data Access Application Blocks! The new sleeper component from Microsoft. Should be standard issue on all .NET servers.<BR><BR>Official Link:<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts