Newbie questions: question 1

J

Jon Sellers

Just finished F. Scott Barkers "InfoPath 2003". I now have a clue! However,
first specific question:

How do I query an access database for a range of values? Example: I have an
order table in access and I would like to query based on starting and ending
order number, entry date, and customerid. Do I modify the sql in the data
connection or somewhere else?
 
F

Franck Dauché

Hi,

You can use C# code behind:

string qry = "MyValue";
ADOAdapterObject oNameTable = (ADOAdapterObject)
thisXDocument.DataAdapters["tblTest"];
oNameTable.Command = string.Format("Select * from tblTest where Test = '" +
qry + "'");
oNameTable.Query();

You just need to modify the SQL statement to fit your case.

Hope that it helps.

Regards,

Franck Dauché
 

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