Query String

J

Jim

I am having problems with a query string.
I can fill a TableAdapter by:
this.TableAdapter1.FillByQS(param1, param2, param3);
but if I try
string QS = Param1 + "," + Param2 + "," + Param3;
this.TableAdapter1.FillByQS(QS);
I get an error telling me that I need three arguments for the FillByQS to
work.
How do I accomplish substituting a string for three arguments.
Thanks in advance for your help,
Jim
 
V

vanderghast

Add (or extend) the class of your object TableAdapter1 with FillByQS(
String s_param) which will parse the string passed as argument to find its
three components and then return FillByQS( param1, param2, param3).

I fail to see why you want to proceed this way, though. If Param1 (which I
assume is a string) already contains a coma, you already have a problem to
split back three substring, and not four.


Why can't you use FillByQS(param1, param2, param3) without those
intermediate encoding/decoding steps?


Would it not be wiser to use a list of strings (collection of strings)
rather than concatenate them, if FillByQS(param1, param2, param3) cannot be
used directly?


Vanderghast, Access MVP
 
M

Mansi Shah

I agree with vanderghast.

FillByQS(param1, param2, param3) is the easiest and most appropriate
way.

If you still want to use FillByQS(Any String), then you must have to
change the definition of FillByQS, as FillByQS(string s).. there no
other option.

Regards,
Mansi Shah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top