Hi,
Yes you can. You can adapt the SQL statement of following code snippet to your case:
string qry = "MyValue";
ADOAdapterObject oNameTable = (ADOAdapterObject) thisXDocument.DataAdapters["tblTest"];
oNameTable.Command = string.Format("Select * from tblTest where Test = '" + qry + "'");
oNameTable.Query();
Hope that it helps.
Regards,
Franck Dauché
InfoPathDev