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 / February 2006

Tip: Looking for answers? Try searching our database.

LDAP query onLoad in VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SpecialK - 01 Feb 2006 00:40 GMT
I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
PO/Procurement form for a corporate intranet.

I'd like to extract the current user's logon name onLoad and use that in an
LDAP query to return information on that user which could then be assigned
variables and placed in the order record. We'd prefer a real-time LDAP
connection to running a daily import to our procurement database (SQL Server
2000).

I'd prefer to do this in VBScript or Visual Basic (2005) but I'm having a
rough time finding any documentation. All InfoPath-related script
documentation seems to use JavaScript and Visual Studio documentation uses C#
or C++ for similar functions.

In a nutshell, I'm looking for some code snippets and a little direction to
get this project rolling. Best practices for this type of app would be
helpful.

Thanks!!!

k
S.Y.M. Wong-A-Ton - 01 Feb 2006 09:50 GMT
Just my 2 cents...

Although daunting for someone new to InfoPath, I would look into using web
services for this scenario if I were you, primarily to avoid security issues
and have loose coupling. You can check out lab 8
(http://msdn.microsoft.com/office/understanding/infopath/training/default.aspx?pu
ll=/library/en-us/odc_ip2003_tr/html/odc_inf_lab_08.asp
)
for directions on how to use web services in InfoPath.

The logon name can be retrieved through code (System.Environment.UserName)
and passed to the web service. The webservice can then use this information
to do the LDAP query. For the latter you can use System.DirectoryServices
(see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemDirectoryServices.asp
).
You should be able to find some code snippets on the web by doing a Google
search; I've even seen VB.NET code using DirectoryServices on MSDN.

---
S.Y.M. Wong-A-Ton

> I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
> PO/Procurement form for a corporate intranet.
[quoted text clipped - 17 lines]
>
> k
Ramana - 02 Feb 2006 08:18 GMT
Hi,
I actually found the help in the scripting editor and visit  
http://infopathdev.com/forums/default.asp forums to find more help and more  
information,

Thanks.
k.Ramana Reddy
www.autonomysystems.com

> I'm new to InfoPath (from some basic ASP) and I'm attempting to create a
> PO/Procurement form for a corporate intranet.
[quoted text clipped - 17 lines]
>
> k
 
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.