Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB code for param with NULL value ???

Status
Not open for further replies.

suel

Programmer
May 9, 2002
13
GB
I have a SQL Sp that has a variable no. of params (uses = NULL in the declaration). This works fine if I use this SP in a CReport, within the s/w, but I somehow need to code in VB this NULL values bit ... Can anyone help ????

This is the code presently :
Code:
Call De1.slFind_Errors_Rpt(hcode, survYear, speriod)

Set params = rep.ParameterFields

For i = 1 To rep.Database.Tables.Count
    rep.Database.Tables(i).SetLogOnInfo MYSERVER, MYDB, tuid, tpid
Next

For Each param In params
         ' NB .. Params are case sensitive
            Select Case param.ParameterFieldName
            Case "@hcode"
                    param.ClearCurrentValueAndRange
                    param.AddCurrentValue hcode
            Case "@survyear"
                    param.ClearCurrentValueAndRange
                    param.AddCurrentValue survYear
            Case "@speriod"
                    param.ClearCurrentValueAndRange
                    param.AddCurrentValue speriod
            End Select
            
        Next

many thanks
Suel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top