A
Alphonse
Hi,
I have a dataadapter that has 2 parameters. But sometimes I would like
to use only one of the parameters.
For example:
The dataadapter selectcommand would be like this:
SELECT CategoryID, CategoryName, Description, Picture
FROM Categories
WHERE (CategoryID = @CID) AND (CategoryName = @CName)
On My code, before filling the dataset, I would add the parameters
Mydataadapter.SelectCommand.Parameters("@CID").Value = 1
Mydataadapter.SelectCommand.Parameters("@CName").Value = "Beverages"
Mydataadapter.Fill(Mydataset)
This Code would run nicely. But how if I want to ignore one of the
parameter? For example I just want to use The @CID parameter. How to
ignore the @CName parameter?
Hope, my question is clear cause my English is not so good. All helps
will be greatly appreciated. Thank you
I have a dataadapter that has 2 parameters. But sometimes I would like
to use only one of the parameters.
For example:
The dataadapter selectcommand would be like this:
SELECT CategoryID, CategoryName, Description, Picture
FROM Categories
WHERE (CategoryID = @CID) AND (CategoryName = @CName)
On My code, before filling the dataset, I would add the parameters
Mydataadapter.SelectCommand.Parameters("@CID").Value = 1
Mydataadapter.SelectCommand.Parameters("@CName").Value = "Beverages"
Mydataadapter.Fill(Mydataset)
This Code would run nicely. But how if I want to ignore one of the
parameter? For example I just want to use The @CID parameter. How to
ignore the @CName parameter?
Hope, my question is clear cause my English is not so good. All helps
will be greatly appreciated. Thank you