Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2006

Tip: Looking for answers? Try searching our database.

Custom Database Access with InfoPath 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
josepk@hotmail.com - 03 Nov 2006 12:59 GMT
Hello,

I'm working with InfoPath 2007 (Beta) and Visual Studio 2005.  I would
like to use C# to create some custom SQL Server calls, for reading and
writing data, using existing SQL stored procedures.

When I call the SQLConnection.Open() method in the InfoPath 2007
"FormEvents_Loading()" event I get a
"System.Security.SecurityException" exception - most likely due to
security permissions not being setup properly with the form.

A couple of questions:

- How does one go about setting up security permissions in an InfoPath
2007 form such that .NET calls within the form will function properly
on a user's machine?

- I want to take advantage of existing SQL Server stored procedures to
populate the data in my InfoPath 2007 form.  Is there maybe an easier
way to do this instead of coding it myself with C# SQL calls in the
InfoPath 2007 form?

- Are there any coding examples online showing C# and InfoPath 2007
integration that I could reference?

Thanks!

Joe
Bruce Sandeman - 03 Nov 2006 13:33 GMT
Hi Joe,
Have you set the form's security level to full trust and signed it with a
certificate?
cheers
Bruce

> Hello,
>
[quoted text clipped - 24 lines]
>
> Joe
josepk@hotmail.com - 04 Nov 2006 03:16 GMT
No - not sure how to set the form security level or sign with a
certificate - any pointers on how?

Also, can I use C# .NET code (e.g. custom DB calls) in my InfoPath 2007
form if I plan on keeping the form as "browser only" (i.e. the client
using the form would not have the InfoPath 2007 client installed)?

Thanks,

Joe

On Nov 3, 7:33 am, Bruce Sandeman <b...@deltaschemenospam.comnospam>
wrote:
> Hi Joe,
> Have you set the form's security level to full trust and signed it with a
[quoted text clipped - 30 lines]
>
> > Joe
Cocteau - 04 Nov 2006 14:40 GMT
Tools, form options, security, simple as that
Bruce Sandeman - 06 Nov 2006 14:43 GMT
Hi Joe,
From the InfoPath 2007 toolbar go to Tools\Form Options\Security and Trust
within there you can uncheck "Automatically determine security level" and
then you can use the radio buttons to set it to full trust.  Once you have
done that you can then check the box "Sign this form template" and click
on the button "Create Certificate".  Then finally click OK to confirm all
those changes.

Yes you can use c# when you have browser compatible forms.  Just be aware
that the code is always executed on the server through a postback using AJAX
and therefore has an impact on response times.
hope this helps
cheers
Bruce

> No - not sure how to set the form security level or sign with a
> certificate - any pointers on how?
[quoted text clipped - 45 lines]
>>>
>>> Joe
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.