Issue linking data from SQL Server to Infopath form

T

tim.hambly

Hello, I was wondering if anyone could help me. I am trying to create an
infopath form that when an account number is entered it queries a database on
an SQL server and automatically populates the Billing or Shipping address
depending on the selection chose in the dropdown box.



I am trying to connect the form to the SQLPROD41 server so that when the
account number is entered and either billing address or shipping address is
selected in the address selection dropdown that address information
automatically prefills in the form. However I am running into an issue where
whenever I go to preview the form I am getting the following box popping up
that just sits there forever and doesn’t go away.

The box that appears says ADO Data Connection Retreiving data from database.

I looked at the database this was originally created in and found that the
following relationships were established:

Under his BAddpull query he had:

Customer number in his entry form = AccountCode in dbo_Account
XID in dbo_Account = AccountXID in dbo_Customer and AccountXID in
dbo_AccountAddress
XID in dbo_AccountAddress = XID in dbo_Address
StateXID in dbo_Address = XID in dbo_State

I created these relationships using a new SQL Server Data Connection Wizard

These fields should correspond with the fields in the form:

AddressTypeXID-dbo_AccountAddress should correspond with my drop down fields
Shipping Address and Billing Address in the Address Selection Section
FirstName-dbo_Customer should correspond with First Name in the Address Info
Section either Billing Address or Shipping Address depending on the selection
selected in the Address Selection dropdown
LastName-dbo_Customer should correspond with Last Name in the Address Info
Section either Billing Address or Shipping Address depending on the selection
selected in the Address Selection dropdown
AddressLine1-dbo_Address should correspond with Address Line 1 in the
Address Info Section either Billing Address or Shipping Address depending on
the selection selected in the Address Selection dropdown
AddressLine2-dbo_Address should correspond with Address Line 1 in the
Address Info Section either Billing Address or Shipping Address depending on
the selection selected in the Address Selection dropdown
City-dbo_Address should correspond with City in the Address Info Section
either Billing Address or Shipping Address depending on the selection
selected in the Address Selection dropdown
StateCode-dbo_State should correspond with State in the Address Info Section
either Billing Address or Shipping Address depending on the selection
selected in the Address Selection dropdown
ZipCode-dbo_Address should correspond with Zip Code in the Address Info
Section either Billing Address or Shipping Address depending on the selection
selected in the Address Selection dropdown

I bound the Customer Number field to the AccountCode in dbo_Account and
created a rule stating if Customer Number is present and Address Selection is
not blank then query the data using this data connection.

I am having no luck with this. Any help anyone could offer would be greatly
appreciated. Thanks,
 
I

infojetsoft

Hi, I suggest monitoring the query sql in SQL Server Profiler, and check
whether it returns too many data.
 

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