I am lost about Infopath and SQL

M

MatsonPP

Hello All,

I clicked on "New form from data connection" and connected to my SQL
databse and table.
Let's say my table has a field called "data1" and it is a varchar of
length 500.

So, I go to controls and click to add a rich text box. Ok, so this
textbox comes up FORCING me to bind my richtextbox to a field in my
table. So in the box there are both queryFields and DataFields. I have
no idea which one to choose, so I assume since it's data that I should
choose data. So i navigate to dataFields->d:TABLE->:data1 and what
comes up? An error: "A rich text box must be bound to a non-repeating
field with a rich text data type". And I'm like "How in the heck can
you have a repeating field anyway in a table, you insert one row at a
time" So I figured that I must have to specify a rich text data type
for my field. But low and behold, there is no such thing in SQL (that I
know of).

So I have given background to my problem. I'm just wondering if anyone
can give me some insight into SQL with InfoPath.

I really appreciate it,
Matt
 
M

mag31

Hi Matt,

So you've set up a data connection to the access database. Infopath sets up
two data structures query and data. These are so that you can query data out
of the database, make changes and submit the data back again. No prizes for
knowing which is which.

Infopath takes your tables in your database and structures them as an xml
tree structure. I.e. You may have an e-commerce db with a Shopper Table and
each Shopper having purchased Products. When you set up your data structure
you then have your shopper table as the Root of your xml structure and each
shopper node then has a number of product nodes (you set up the
relationships).

Coming back to your problem. The tables are represented by Sections in
Infopath and the columns are attached to standard controls. This means that
you need some sort of Section to put your richtextbox into. The fastest way
to do this is to drag and drop the data structure onto the form, select the
option for repeating sections. This will create your default form for you.
You can then change your controls and the sections.

Hope this helps,
Mark Grant
Cambridge Convergence Limited
UK
 
M

MatsonPP

When I dragged the structure in, it nicely created all my labels and
control inside a repeating section. When I right-clicked one of the
textboxes it created and when to the "Change To->" menu, there was no
option for rich textbox :(

Any other ideas?
Thanks!
Matt
 
M

mag31

Hi Matt,

Try using a blob data type on the database. The blob data type stores your
data as 1s and 0s not text and is more likely to cope.

Mark
 
M

MatsonPP

I went in to design the field, and there was no blob datatype in the
drop down list. I'm using SQL Server 2000
 

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