Retrieving stored data

A

Andre Alicea

Hello all,
Pardon the question if it's a simple one, as I'm just getting my feet wet
with this application.... If I create a form that stores data directly into
a database, can I use that form to retrieve the form's data from the
database??
 
J

Jerry Thomas [MSFT]

YES!

I would suggect starting with a very simple Access database and just spend a
little time seeing how things work. Create a database with 4 or 5 fields.
Make some of them text and some numeric.
Then create a new InfoPath form using "New from Data Connection". You will
end up with a template for querying and submitting data.


--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 
A

Andre Alicea

Jerry,
Thanks for your response. I've done that with a SQL Server db. I was
successfully able to create a template against a SQL db and then use the
form to enter data to the database. My question comes about when I am
trying to retrieve specific data. For example, one field in my db and on
the form is 'BacklogID'. When I enter the BacklogID and hit search, it
appears that data is retrieved for all of the records in my database. I use
SQL Profiler to look at the query that is being sent to the database, and it
appears that there is no code that generates the where clause of 'where
BacklogID = xxxx'.



Jerry Thomas said:
YES!

I would suggect starting with a very simple Access database and just spend a
little time seeing how things work. Create a database with 4 or 5 fields.
Make some of them text and some numeric.
Then create a new InfoPath form using "New from Data Connection". You will
end up with a template for querying and submitting data.


--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Hello all,
Pardon the question if it's a simple one, as I'm just getting my feet wet
with this application.... If I create a form that stores data directly into
a database, can I use that form to retrieve the form's data from the
database??
 
J

Jerry Thomas [MSFT]

It sounds as if your query field isn't from the QueryFields section of your
data Source.

--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Jerry,
Thanks for your response. I've done that with a SQL Server db. I was
successfully able to create a template against a SQL db and then use the
form to enter data to the database. My question comes about when I am
trying to retrieve specific data. For example, one field in my db and on
the form is 'BacklogID'. When I enter the BacklogID and hit search, it
appears that data is retrieved for all of the records in my database. I use
SQL Profiler to look at the query that is being sent to the database, and it
appears that there is no code that generates the where clause of 'where
BacklogID = xxxx'.



Jerry Thomas said:
YES!

I would suggect starting with a very simple Access database and just
spend
a
little time seeing how things work. Create a database with 4 or 5 fields.
Make some of them text and some numeric.
Then create a new InfoPath form using "New from Data Connection". You will
end up with a template for querying and submitting data.


--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Hello all,
Pardon the question if it's a simple one, as I'm just getting my feet wet
with this application.... If I create a form that stores data directly into
a database, can I use that form to retrieve the form's data from the
database??
 
A

Andre Alicea

Is there a way to use one field for both data entry and data query?
Ideally, I would like to have two buttons on the bottom of the form. One
for submit and one for search. If I click the submit button, then it would
write/update the database. If I click the Search button, then it would
query the database. Is this possible??


Jerry Thomas said:
It sounds as if your query field isn't from the QueryFields section of your
data Source.

--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Jerry,
Thanks for your response. I've done that with a SQL Server db. I was
successfully able to create a template against a SQL db and then use the
form to enter data to the database. My question comes about when I am
trying to retrieve specific data. For example, one field in my db and on
the form is 'BacklogID'. When I enter the BacklogID and hit search, it
appears that data is retrieved for all of the records in my database. I use
SQL Profiler to look at the query that is being sent to the database,
and
it
appears that there is no code that generates the where clause of 'where
BacklogID = xxxx'.



Jerry Thomas said:
YES!

I would suggect starting with a very simple Access database and just
spend
a
little time seeing how things work. Create a database with 4 or 5 fields.
Make some of them text and some numeric.
Then create a new InfoPath form using "New from Data Connection". You will
end up with a template for querying and submitting data.


--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Hello all,
Pardon the question if it's a simple one, as I'm just getting my
feet
wet
with this application.... If I create a form that stores data directly
into
a database, can I use that form to retrieve the form's data from the
database??
 
J

Jerry Thomas [MSFT]

You can have the Query field with a default value = the Data field.

In the Data Source view of the Task Pane, right click BacklogID under
"queryFields" and select Properties.
In the Default Value field, click the function button and select the
BacklogID field under "dataFields".

(Just to make sure it is working you could add the query field to your form
and then take it out later.)

Now your Submit can do what you need and your query will be based on what is
in the BacklogID data field!

--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Is there a way to use one field for both data entry and data query?
Ideally, I would like to have two buttons on the bottom of the form. One
for submit and one for search. If I click the submit button, then it would
write/update the database. If I click the Search button, then it would
query the database. Is this possible??


Jerry Thomas said:
It sounds as if your query field isn't from the QueryFields section of your
data Source.

--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Andre Alicea said:
Jerry,
Thanks for your response. I've done that with a SQL Server db. I was
successfully able to create a template against a SQL db and then use the
form to enter data to the database. My question comes about when I am
trying to retrieve specific data. For example, one field in my db and on
the form is 'BacklogID'. When I enter the BacklogID and hit search, it
appears that data is retrieved for all of the records in my database.
I
use
SQL Profiler to look at the query that is being sent to the database,
and
it
appears that there is no code that generates the where clause of 'where
BacklogID = xxxx'.



YES!

I would suggect starting with a very simple Access database and just spend
a
little time seeing how things work. Create a database with 4 or 5 fields.
Make some of them text and some numeric.
Then create a new InfoPath form using "New from Data Connection".
You
will
end up with a template for querying and submitting data.


--
Jerry Thomas[MSFT]
<[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no
rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.


Hello all,
Pardon the question if it's a simple one, as I'm just getting my feet
wet
with this application.... If I create a form that stores data directly
into
a database, can I use that form to retrieve the form's data from the
database??
 

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