File Attachment Issue

S

Sammy

Hi All,

I am trying to use the File attachment control to a form that has a
Parent/child relationship table in SQL Server 2000. I have added a image
column to the child table and would like to store a pdf file to this column.
However when I try to bind the image column using the File attachment
control, I get a pop up that says:

" A file attachment control must be bound to a non-repeating field with a
picture or file attachment data type. If the field is part of a repeating
group, then the file attachment control must be inside a repeating section
that is bound to that group."

I tried to move that image column to the repeating but still get that pop
up....and it is also an image column....

Can anyone please help with this issue....
 
L

Larry Spencer

You may have a bigger problem. It appears that you set up your data
source to link directly to the SQL Server tables, with no web service
in between. If your SQL table has an "image" data type, you got a
message when you set up the data source that you may not have noticed:
"One or more of the columns in the data source has a long data type
(text, ntext, hyperlink or image). Long data types are not supported."
It's a message that's buried on a larger dialog box, and is very easy
to miss. It's not too late to find it, though. Do Tools / Convert
Main Data Source, then press Next until you get to the dialog in which
you "Enter a name for this data connection." In the Summary, check the
Submit Status. Does that error message show? If so, you may want to
think about putting a Web Service between your InfoPath form and the
database. (That's a good practice anyway; see the article titled
"Working with Image Objects in InfoPath 2003 and SQL Server 2000" in
MSDN.) When you interface with a Web Service, you can easily use
base-64 encoding to upload the image. If you're interested in that
approach and have questions, post again and I'll try to help.

As for the error message you're getting, the following link gives some
background and a work-around.
http://www.sharepointu.com/forums/m_12578/mpage_1//tm.htm#14657
 
S

Sammy

Hi Larry,

Thanks a bunch for your help...Yes, I did find that "Long data types are
not supported" error. I am now looking at the the work around link that you
suggested...
 
D

Dave Babin

Larry,

Just saw this post. I am working with InfoPath 2003 and SQL Server 2000. I
have a web service that does the inserts and updates no problem as long as I
do not have a long data type. I searched for the doc you recommended, but
cannot find it and have searched the web high and low for someone who has a
'WORKING' example of moving a file attachment from the form into a SQL Server
Table. Can you point me in a direction to find this?

Thanks much,

Dave Babin
 
D

Dave Babin

Sammy,

Looking at this post just today. Did you ever get this to work?

Thanks

Dave Babin
 

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