Previous Topic

Next Topic

Inhoudsopgave

Book Index

TParams Object

TParams

Description

TParams manages a list of field parameters.

Details

Datasets that represent queries and stored procedures use TParams objects to represent the parameters of their query or stored procedures.

Use the properties and methods of TParams to:

TParams Methods

Method Method Add

Creates a new TParam instance and adds it to the list of field parameters.

Method Method CreateParam(DataType: String, Name: String, ParamType:String): Param

Creates a new TParam instance and adds it to the list of field parameters.

Method Method Clear

Clears the list of field parameters.

Method Method ParamByName(Name: String): Param

Locates the parameter with the given name.

Code Snippet

Set spCountry = IsahObjects.Get("TIsahStoredProc")

With spCountry

.Name = "spCountry"

.DatabaseName = "dbIsahAdmin"

.StoredProcName = "IP_get_Country"

.Left = 312

.Top = 8

End With

spCountry.Params.Clear

Set aCountry = xspCountry.Params.Add

aCountry.Name = "@CountryCode"

aCountry.ParamType = 1 'input

aCountry.DataType = 1 'string

aCountry.Value = edtCountryCode.Text 'take the value of Edit1

Set aDescription = spCountry.Params.Add

aDescription.Name = "@Description"

aDescription.ParamType = 2 'output

aDescription.DataType = 1 'string

MsgBox spCountry.Params.ParamByName("@Description").Value