REtrieving data from SQL

J

jar92380

Hello

I would like to know what steps I would take to be able to input a number,
have it check against a sql db and then bring back some static numbers which
are in the database.

What I have so far is, I have created the data source and I know it works
cause if I use the list box all of the number show up. However if I use a
text box and a submit button which does the following

Rules:

JobNumber = WBS1 (database table which stores all the numbers)

Actions:

Query using a data connection : database
set a field's value: HotelCost = @custReimbHotelRate
set a field's value: RentalCar = @custReimbcarRate
set a field's value: Airfare = @custReimbAirRate

and thats it. Any ideas?
 
C

Clay Fox

So the problem is you are getting the values from the first record not the
one selected?

A filter is what you need to say set the values but where jobnumber = WBS1.

That way you get the data for the correct record.

I work with databases and InfoPath every day.
If you want to email me I could show you some examples.
 
A

AugieT

It would be really helpful to see some code here in the blog - this standard
answer of e-mail me doesn't help the rest of us out in cyberspace.
 

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