Skip to main content
deleted 9 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Hey guys I have this piece of code for running a Stored Procedure, and I was wondering if there is a way of cutting code like:

Hey guys I have this piece of code for running a Stored Procedure, and I was wondering if there is a way of cutting code like:

I have this piece of code for running a Stored Procedure, and I was wondering if there is a way of cutting code like:

better title; cut out some noise; code works just as well in vba so I added the tag; created adodb tag;
Source Link
RubberDuck
  • 31.2k
  • 6
  • 74
  • 177

Shortening my code VB Calling Stored Procedures with Lots of Parameters

   uPar = .CreateParameter("@PropertyID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput)
        .Parameters.Append(uPar)
        .Parameters("@PropertyID").Value = Val(lblPropertyIDValue.Text)
   uPar = .CreateParameter("@PropertyID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput)
        .Parameters.Append(uPar)
        .Parameters("@PropertyID").Value = Val(lblPropertyIDValue.Text)

Hope someone can help.

Thanks

Shortening my code VB

   uPar = .CreateParameter("@PropertyID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput)
        .Parameters.Append(uPar)
        .Parameters("@PropertyID").Value = Val(lblPropertyIDValue.Text)

Hope someone can help.

Thanks

Calling Stored Procedures with Lots of Parameters

   uPar = .CreateParameter("@PropertyID", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamInput)
        .Parameters.Append(uPar)
        .Parameters("@PropertyID").Value = Val(lblPropertyIDValue.Text)
edited tags
Link
Heslacher
  • 51k
  • 5
  • 83
  • 177
added 3 characters in body
Source Link
Abbas
  • 5.6k
  • 24
  • 40
Loading
Source Link
Dave123432
  • 315
  • 2
  • 7
Loading