Compare Username Field from InfoPath with Username Field from DB and display Namefield - InfoPath Dev
in

InfoPath Dev

Compare Username Field from InfoPath with Username Field from DB and display Namefield

Last post 02-09-2010 12:09 AM by partysan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-05-2010 07:40 AM

    Compare Username Field from InfoPath with Username Field from DB and display Namefield

     Hello!

     Im very interessted to solve the following problem:

     

    I have a Database (*.mdb) with two fields.

    Username and Name.

     

     Furhtermore a Infopath form with two fields.

    Username ( fieldname: UsernameAusSystem; value: userName())

    Name  (fieldname: NamenAusDB; value: @Name->get the Name field from the Dataconnection)

     

    Database and Infopath Form are connected with a simple dataconnection.

    The goal is  compare the Username field from Infopath with the Username field from the DB

    and if its machted then put  the value from the Database Name field into Infopath Name field.

    The following SQL-Code doesnt work:

    select [ID],[Usernamen],[Name] from [UsernameAusDB] as [UsernameAusDB]
    where [Usernamen] like [UsernameAusSystem]

     

    I think it is a little problem, if i write:

     select [ID],[Usernamen],[Name] from [UsernameAusDB] as [UsernameAusDB]
    where [Usernamen] like "JohnSmith"

    and JohnSmith is a value in the database, it works.

    Can anybody write me the write syntax?

     Regards

    Philipp

     

     

     

     

     

     

  • 02-05-2010 05:12 PM In reply to

    Re: Compare Username Field from InfoPath with Username Field from DB and display Namefield

    Hi -- are you talking about using the a form field in your form as part of the SQL query in your data connection? If so, I'm afraid your choices are code or web services (we sell a great one that does this, and you can get a free trial here).

    Hilary Stoupa

  • 02-09-2010 12:09 AM In reply to

    Re: Compare Username Field from InfoPath with Username Field from DB and display Namefield

     Thank you Hilary but I found another way to solve this problem,

    I get the information from LDAP.

    http://msdn.microsoft.com/en-us/library/bb952744.aspx#ip2007GettingUserInformationActiveDirectory_ReadIt

     

    regards

    Philipp

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.