How do I create a Login Form - InfoPath Dev
in

InfoPath Dev

How do I create a Login Form

Last post 03-22-2007 09:42 AM by Matt Faus. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-21-2007 08:52 AM

    How do I create a Login Form

    Hi,
    I have an Infopath form that submits records to a table in SQL. This part works fine.

    However before the user submits his records to the table I would like him to enter his username and password that is stored in this same table and be validated against this same table. So I am trying to create a section in the form that is basically a login section.
    Any idea how I can go about this? Any help is appreciated.
    Thanks in advance!
    -Vidette
  • 03-21-2007 08:57 AM In reply to

    Re: How do I create a Login Form

    Hi Vidette,

    The easiest way to do this is to add a connection to that table in the database as a secondary DOM connection and then make a UserName and Password node on another XML-based secondary DOM. AFter this add a button that see if the name/pwd combo exists in the secondary DOM and then if so, switches views.

    However, this will be brutally insecure as you will be piping every user's name/password down unencrypted. A simple user might not realize that they could quite easily get at these, but anyone that knows anything about InfoPath and has the desire for everyone's password could easily access these.

    Unless, of course, you stored the passwords encrypted in the database (which is best practice) and ship them down to InfoPath that way. However, for this you'll have to add code to encrypt the plaintext typed by the user and then compare to the passwords retrieved from SQL.

    PS - Make the font color the same as the background color for password fields.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-21-2007 01:17 PM In reply to

    Re: How do I create a Login Form

    Hi Matt, Thanks for your help. I will have to give that a try.
    Also one more question. Is there an easy way to call a stored procedure from Infopath? I noticed you can connect to views and tables but not stored procedures? Or am I missing something?
  • 03-21-2007 03:57 PM In reply to

    Re: How do I create a Login Form

    I haven't ever called a stored procedure from InfoPath, but I was reading today about a feature in SQL2005 where you can expose sprocs as web service methods. If you can get this setup, then you can add a data connection to that web service in InfoPath and it should be pretty easy to call the sproc.

    Here's the link:
    http://msdn2.microsoft.com/en-us/library/ms345123.aspx

    Good luck, and if you try it out please respond back with your experience.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-21-2007 09:22 PM In reply to

    Re: How do I create a Login Form

    Hi Vidette!
    Great to see you here. Did you know that you can just install our DBXL and use our Active Directory Web Service and Database connection methods to accomplish the same thing? No coding required! :)
    Patrick Halstead
    Project Manager at Qdabra
  • 03-22-2007 07:30 AM In reply to

    Re: How do I create a Login Form

    Hi Matt, thanks for the info. I managed to call the proc and it worked!!
  • 03-22-2007 07:34 AM In reply to

    Re: How do I create a Login Form

    Hi Patrick!
    The DBXL is this a free product? I remember downloading it like a year ago and was not able to get it going. But I'll give it a try again. Thanks Matt and Patrick, for the help on this posting. You all are awesome!!
  • 03-22-2007 09:42 AM In reply to

    Re: How do I create a Login Form

    Hey Vidette,

    Cool, I'm glad you got it working! Patrick's right - DBXL is awesome and can handle pretty much everything you throw at it, but there is currently no support for calling a sproc. Our other product, EnumDB, could be used to enumerate the entire database, which might be able to accomplish the same thing as the sproc.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.