Help!  EXPERTS in COLDFUSION there! How can I connect my my MS SQL database CFPROPERTY to authenticate a user

I have currently the application works a lot using a combination of authentication of users/roles with username, password and roles hard coded into my cfproperty below.

MY QUESTION: I use Flex 2 with ColdFusion MX 7.02 and MS SQL Server Express 2005. I wish I could take my component below and query my MembershipInfo table in my database to authenticate my users against my login form. My data source is "myDatabase" and the table with the connection information is called "MembershipInfo." Also in my login form, my username textinput id is 'usernameTextInput' and my password textinput id is "passwordTextInput." My login form component name is "LoginHBox.mxml" which, in a folder called 'view '.

MY QUESTION: How the query must be written correctly connect to my database to check the user authentication AGAINST my login form? I know that it is possible, but I'm having a hard time finding the logic. Any help would be greatly appreciated.

NOTE: I am successfully able to query the same database to populate a DataGrid control, so I am able to connect to my database using the remote control blinks.

< cfproperty >
< name cffunction = "loginUser" access = "remote" returntype = "WebsiteApplication.cfc.UserCFC" >
< cfargument = 'user name' name type = "string" required = "true" >
< name cfargument = "password" type = "string" required = "true" >

< cfset var user = createObject ("component", "UserCFC") >

<!-the CFIF and CFELSE below contain roles, passwords and username hardcoded
I would like to replace them with the news of my database, but need help to understand the logic->
< cfif arguments.username is "admin" and "password" arguments.password >
< cfset user .loggedin = true >
< cfset user .username = "admin" >
< cfset user .roles = "SeniorAdministrator" >
< cfreturn user >

< arguments.username cfelseif's "user" and arguments.password is "password" >
< cfset user .loggedin = true >
< cfset user .username = "user" >
< cfset user .roles = "Visitor" >
< cfreturn user >

< cfelse >
< cfreturn user >
< / cfif >
< / cffunction >
< / cfproperty >

paross1,

Thank you very much for your message! Thanks to you I could understand our logic for all workers. Here's what my CFC looks like now...






SELECT the name of user, password, AccessLevelID, FirstName, LastName
FROM dbo. MembershipInfo
WHERE
Username = "#username #
AND password = ' #password #














You're my HERO for the week!

John

Tags: ColdFusion

Similar Questions

  • How can I connect the form to the database?

    How can I store the form data entered in the database in adobemuse? You please tell me any possibility of storage and provide authentication and make entries in adobemuse?

    Hello

    Please check the related threads

    How can I connect to SQL Server with the Muse?

    MySQL DB & Adobe Muse

  • How can I connect dreamweaver to 000webhost mysql/database

    The guys I spent 3-4 days just to connect the database with my dreamweaver. But I've missed so far.

    I just created a site with Basic 4 simple registration pages.

    -index.php

    -Login.php

    -register.php

    -access denied.php

    I created a table/database in 000webhost and all is well. But I can just connect it to dreamweaver.

    I use dreamweaver cc 2015.

    Whenever I try to serverbehaviour Recordset, I can't connect to database 000webhost.

    Here is the screenshot of the error.

    It comes to the start page of the registration page. I have not yet designed and all. I want to correct this 1...

    Thank you1.jpg2.jpg3.jpg4.jpg5.jpg6.jpg7.jpg

    OK, all around confusion side, you have a PHP/MySQL Server works like a charm on your local machine and you want to load on the remote control.

    If you have correctly configured the remote control in setting up a Dreamweaver Site, there should be no problem to download files in the correct remote directories. This leaves us with the transfer of data files.

    Open your local database in phpMyAdmin and then select export from the menu. Scroll and select the Save as file check box, and then press Go.

    Now, open the database in phpMyAdmin on the production server (Note: you'll need to create the database), and then select Import from the menu. Browser for the file that you saved, and then press go.

    If all goes well you should now have a mirror image of your database on the production server!

  • Help please... How can I cancel my membership music Apple and subscription?

    Help please... How can I cancel my membership music Apple and subscription?

    Click here, follow the instructions and wait until it expires. If you need to cancel immediately, Contact Apple.

    (140954)

  • How can I connect another monitor to compaq SG3 because there is only 1 VGA port and no HDMI.

    How can I connect another monitor to compaq SG3 series because there is only 1 VGA port at the back and there is no HDMI port.  The operating system is Windows 7. I think to buy vga splitter, I don't know if that will allow me to move images/data between the monitors. Please tell us what to do. Thank you

    It is based on the expected results.  A VGA splitter will give you two monitors but they will display the same image.  If the expected result is two different pictures, maybe something like this will do;

    http://www.Amazon.com/IOGEAR-external-video-card-GUC2015V/DP/B000NJFJJK

    or

    http://www.Amazon.com/STARTech-com-external-video-monitor-adapter/DP/B005G306I2/ref=pd_cp_e_0

    Some will also do DVI: http://www.amazon.com/Plugable-Multiple-2048x1152-1920x1200-DisplayLink/dp/B0038P1TP4/ref=sr_1_1?s=electronics & ie = UTF8 & qid = 1345919878 & sr = 1-1 & keywords = usb + to + DVI

  • My sister has problems on his laptop, how can I connect to the laptop with my labtop to help him with his computer problems? Thank you.

    My sister has problems on his laptop, how can I connect to laptop with my labtop to help her with her computer problems when I live several States away? Please help me if you know how to do this thank you.

    Suggest you use Team Viewer, free version.
    It is used here every day for several hours.

    Please see the links below for more details...
    http://www.TeamViewer.com/en/index.aspx
    http://www.TeamViewer.com/en/products/remotecontrol.aspx
    http://www.TeamViewer.com/en/help/cat15-remote-control.aspx

  • How can I connect to someone who is hacking my network?

    How can I connect to someone who is hacking my network?

    Hi Frank,.

    What kind of network - your internet connection?  your intranet from home or the office (and it is wireless or wired or both)?  An ad - hoc network or a network based on the domain server (and if the latter, what type of server)?  The network hosts a web site, an exchange server that is accessible by internet, or also allowed incoming connections?  How many computers is on the network and what are the current use operating systems and who do you think are presented?  If you use a router, is protected by a router security identifier unique and a password (no admin / admin or other default standard settings, everyone knows) and a unique key and what type of security type (WPA, WPA2,...) and what type of encryption code?  This can be verified by the computer and others need to be checked or enabled via the router you can reach most likely through your browser by typing 192.168.1.1 where you would normally enter a URL.  If this isn't the correct code, then see below for IPCONFIG and would probably be the address that you want as the gateway by default and possibly the address of the DHCP server or the DNS server address as well and use what is there instead.  What type of method of internet access (DSL, cable, Satellite,...)?

    How do you know if that someone is hacking your system?  What evidence do you have that it happens or happened?  How do you think that piracy happens - happens through your connections in real-time (as if someone used a remote access or remote desktop) or it occurs because you seem to see the proof of it (if so, what evidence)?  I am trying to determine if a person has a path in your system directly or whether you are infected with malware that allows a periodic access or 'appear' as you are being hacked, when you are just infected.

    Do you notice it when it is real or only later after it occurred?  What exactly is the pirate make - information collection, change of information, install programs, remove programs or information, theft of bandwidth, or you are not sure and don't know exactly?  This happens only when you are connected to the internet or does it also occur when you are not connected and just using the computers and devices that are other interconnected?  If it isn't when it is connected to the internet, which helps limit the possibilities.

    If you are present and it's ongoing, click on start / all programs / accessories / right-click on command prompt and click Run as administrator.  Then type IPCONFIG/all and enter.  Which should display all connections to your computer, and if anyone is connected, this connection must appear, as well as login information and include information such as address TCP/IP (which may be useful to know).  Create a capture image or printscreen of the information.

    If you use Vista or Windows 7, go to start / Control Panel / Network and sharing Center / discover computers and devices.  Is there a link that doesn't seem right or that you don't recognize?  Come back and click on manage network connections.  Are there connections that you don't recognize?  If so, click on them and learn what you can about the properties and other information - create a capture of information or save a printscreen image.

    You use the Windows Firewall and is it activated and functioning?  Open and check exceptions and remove the items that you do not use or do not need - by default adds a lot of things that most people do not use. and everyone is a path in your system.  The less open ports, the better.  Do not remove everything you really need, but uncheck everything you don't need (you can always add it back later if the need ever happens).

    It's just a start on what to do to gather information.  I need the results and answers to give additional advice on what to do next - depending on what you have to say.

    Most likely, we will be able to best prevent access or possibly with the help of your ISP and the ISP of the hacker TCP/IP address (if we find the it), be able to identify who it is and stop it or help you gather enough information take legal or security action against the person or persons responsible.  Ago probably pirates out there that can do what you're tempted, but also provides methods of hacking (and that is basically what YOU want to do) is not something we support or help someone to do here.  To help you protect your system is one thing and we'll do what we can to help here - teach you how to hack the somone who is hacking you is quite another and we will not be involved in this.

    ***********************************************************

    In the meantime, in case there is an infection as opposed to a direct hacking, update and run a full scan with any security software you use.

    If you do not have because they can help, try the following programs. I recommend you download, install, update and run full scans with Malwarebytes:http://www.malwarebytes.org/ and SuperAntiSpyware:http://superantispyware.com/ and then run a full scan of Microsoft Security:http://www.microsoft.com/security/default.aspx.

    Check the following compliments from Stephen Boots - MVP:

    S ' ensure that the Windows Firewall is enabled.

    S ' ensure that all critical updates or important, including service packs for the operating system and programs are installed from Microsoft Update (Windows Update).

    -Make sure that Internet Explorer is version 8 or 9 and implemented to date with all patches.

    -In Internet Explorer 8 or 9, use the SmartScreen filter.

    -Make sure that the Internet IE security settings are at least put to fire medium-high (default).

    -Turn on the pop-up blocker in Internet Explorer.

    -On Vista and Windows 7 make sure that User Account Control (UAC) and doesn't work with elevated privileges.

    -Make sure that automatic updates of Windows are set to notify at least, but the preferred setting is to download and install automatically. If you update manually, be sure to update as soon as possible after being informed of updates available.

    -Make sure that installed applications, including Adobe Acrobat, Adobe Flash and Java are at their latest versions. Many vendors are regularly updated and fixes security vulnerabilities.

    -Never click through links from unknown sources and be careful, even if they are from a "reliable".

    -Do not open attachments in unsolicited e-mail.

    -Practice safe web surfing.

    To ensure that you are not infected (or remove the suspicion that you are infected which is often the case in such situations and is done either by hackers or may appear as the pirates are active when it is just a system infected - or if more than one, you have several computers connected), please follow these compliments of recommendations of JimR1 - MVP :

    You are running Microsoft Security Essentials?

    If Yes: start here - https://support.microsoftsecurityessentials.com/ and select the link that says - I think my computer is infected - and support and select the option for phone, chat or email (options vary depending on the region)

    If you are in North America, you can call 866-727-2338 for a free Microsoft Help for infections of virus and spyware.

    Otherwise:

    You can start here: https://consumersecuritysupport.Microsoft.com/ or here: http://support.Microsoft.com/contactus/cu_sc_virsec_master?WS=support#TAB0 for the help and support for malware infections.

    If this does not work, or that they can't help, try one of the compliments of forums-remove malware following PA Bear - MVP:

    I can recommend the assistance of experts available in these forums: http://spywarehammer.com/simplemachinesforum/index.php?Board=10.0 http://www.spywarewarrior.com/viewforum.php?f=5 http://www.dslreports.com/Forum/Cleanup http://www.Bluetack.co.uk/forums/index.php and http://Aumha.net/viewforum.php?f=30

    *************************************

    The first section will collect information about your situation so we can get an idea where to look and what to look for (and perhaps even determine if it occurs).

    The second section will verify that your computer or network is not infected (you should do this for all the computers on the network) or clean if they are and which remove the cause of the problem (of least temporarily).

    I hope this helps and await your response with responses, results and information.

    Thanks and good luck!

  • How can I connect my Qosmio to satellite TV receiver?

    How can I connect my Qosmio to my Philips satellite TV? The receiver seems to have only scart out?
    The Qosmio comes with a SCART/DVI (?), but the DVI port was only released?

    First I thought that I had a problem of tuner that I was not able to connect to the antenna but the works of Qosmio with a cable connection to a friend. I can't find a solution in the manuals or on this forum, what helps?

    Hello

    In my opinion there are not a lot of discus. Check IN the ports that you have and you can use them to watch television. In your case, you can try to find any adapter between the SCART and ports available on your device.

    Good luck!

  • How can I connect my internal microphone Satellite M40?

    Can someone tell me how can I connect my internal mic in my Satellite M40?

    The manual says there is one, but I tried to record voices and the use of Skype, but nothing is recorded... I've tried to change the settings on audio devices, but nothing happens. Please help, I really need.
    Thank you

    Hello

    Well, check in the settings sounds and Audio--> Audio devices.
    In the section sound recording press the volume key. Check if the Microphone is selected.
    Check the advanced settings. In this section, the internal microphone must be marked.

    Good bye

  • How can I connect from a PC to another PC using LabVIEW

    New IAM for LabVIEW and need help. How can I connect from a PC to another PC using LabVIEW. IE how to connect to the IP of the PC, another address using LabVIEW. Thanking you.

    There are a few methods of network communications in LabVIEW.

    Some of them, in no particular order:

    -Network shared Variables

    -Flow network

    -Screw HTTP and Web Services client

    -TCP

    -UDP

    (There are also libraries of pre-written e-mail based on UDP/TCP)

    Which the decision to go for depends on many factors (e.g. should you read the last value of variables, flow without any loss of data, data dissemination or send messages/packets of data, etc.). I suggest take you a look at some examples in the finder of the example (help-> find examples...). If you are really new to LabVIEW, I suggest you take some free LabVIEW tutorials - take a look at the links at the bottom of the first post in this thread.

  • my hp deskjet 840C is connected to my desktop, how can I connect it to my laptop computer in my network

    my HP deskjet 840C printer is connected to my desktop, how can I connect to my laptop in my network

    [Moved from Community Participation]

    Hello Stephen,

    You did mention the operating system installed in the laptop. Provide that information will help you provide better assistance.

    Basically, if your laptop and the printer are connected to the same network (or even router), you can configure and connect to this printer as a network printer in the laptop. The article I'm referring below has a tutorial on how to connect printers (Local and network), please go through the information in there and see if it helps you as well.

    Install a printer

    http://Windows.Microsoft.com/en-us/Windows/install-printer#install-printer=Windows-7

    If you need assistance, just reply to the version of the operating system running on the laptop, and we'll be happy to help you.

    Thank you and have a nice day ahead!

  • How can I connect to windows vista Home premium withou admin password

    How can I connect to windows vista Home premium withou admin password

    Hello

    If it is not applicaple, you need to reinstall the operating system.

    "What to do if you forget your Windows password"

    http://Windows.Microsoft.com/is-is/Windows-Vista/what-to-do-if-you-forget-your-Windows-password

    "If you forget the administrator password, and you do not have a password reset disk or another administrator account, you will not be able to reset the password. If there is no other user account on the computer, you will not be able to log on Windows and you need to reinstall Windows. »

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    See you soon.

  • I forgot my administrator password. How can I connect? I don't have my drive only product key.

    I forgot my administrator password. How can I connect? I don't have my drive only product key.

    http://support.Microsoft.com/default.aspx/KB/189126

    "Microsoft's strategy concerning lost or forgotten passwords"

    Microsoft cannot help you recover the passwords of the files and Microsoft who are lost or forgotten product features.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    How to get Vista recovery Media or the Vista recovery Partition on your computer back to factory settings.

    There is no Vista free download legal available.

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    In addition, ask them if you have a recovery Partition on your computer/laptop to restore it to factory settings.

    See if a manual provided with the computer or go to the manufacturer's website, email or you can call for information on how to make a recovery.

    Normally, you have to press F10 or F11 at startup to start the recovery process...

    Another way I've seen on some models is press F8 and go to a list of startup options, and launch a recovery of standards of plant with it, by selecting the repair option.

    Ask them if you can also make recovery disk/s for the recovery Partition in case of a system Crash or hard drive failure.

    They will tell you how to do this.

    Every computer manufacturer has their own way of making recovery disk/s.

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    Save all data, because it will be lost during a clean installation.

    See you soon.

    Mick Murphy - Microsoft partner

  • How can I connect Epson printer by wireless to 2wire modem from Bell?

    Hello there, I would like to ask how can I connect my Epson printer to my new internet network from Bell? In fact, I used more then one of Rogers, their internet service connected to the decoder of Rogers cable, in the meantime, I used wifi router connected with printer, but currently, I went to the Bell company, Bell connect system is difference, their modem was Bell 2WIRE, they had wifi build in for all my cell phone in the House. Simply because with the new Bell network, I could not turn on my wifi printer, can everything you help me fix it? Please... Thank you and have a nice day.

    WinneTran

    Hi WinneTran,

    You can see the following article on the Epson printer on wireless network connection:

    Connect to Bluetooth and other wireless or network devices

    http://Windows.Microsoft.com/en-us/Windows7/connect-to-Bluetooth-and-other-wireless-or-network-devices

     

    Setting up a wireless network

    http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-wireless-network

     

    Add a Bluetooth device or other wireless or network device: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/add-a-Bluetooth-or-other-wireless-or-network-device-frequently-asked-questions

    Hope this information helps. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

  • How can I connect in pdf export

    How can I connect in pdf export?

    Hi gregb73859509,

    You can connect via the web interface at https://cloud.acrobat.com or in Adobe Reader, by clicking on the blue sign in link in the upper right. In both cases, the use of your Adobe ID and password and you should be all set!

    Please let us know if there is something else we can help with that!

    Best,

    Sara

Maybe you are looking for

  • Satellite L840 - failed to open the Webcam and microphone

    Hello Toshiba Support Forum, I bought the laptop Toshiba Satellite L840 on July 18, 2012 in Australia.The laptop fails to launch the webcam when tried to start the webcam.And she also does not detect the webcam and built-in microphone. Since I bought

  • 2012 mac pro drive whining/spinning

    I have a 2 TB Western Digital drive with an installation of Windows 8 on it which has failed to start several times with an error indicating that the disc was bad. now when I boot on mac OS, I hear that a relatively high slope spinning/whine that com

  • H key will not work on new T430

    Hello I recently got a T430, and the H key does not work when I press on it with 2 other keys at all I hear is a beep He also was a gift so I can't return it please help.

  • Aspire its V Nitro VN7 - 791G only in left ear

    Hello! Today, I ran into a problem with my helmet, I have new headphones 2 days ago and everything was fine until this morning where I could only hear left of my headphones. I thought it's fault to Atria then I tried it on my other pc and they worked

  • Canon PowerShot A3100 IS digital camera

    My camera PowerShot A3100IS does not work in my PC. The operating system is WIN XP Pro. 32 bit SP 3. WIN doesn't recognize and display the error message 28 (no driver). Canon say that this device need not any en WIN XP driver. What will happen? Thank