EasyCFM.COM ColdFusion Forums / ColdFusion Applications / Too few parameters. Expected 2

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Too few parameters. Expected 2

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

richdaddy
12-14-2003 @ 3:31 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 20
Joined: Jul 2003

Umm i'm trying to get more uses out of my users database, i read up on setting more options like last login, ip, browser etc. But it seems i keep getting errors of different types depending on what i do etc.

I was using this page to help me understand:

Validating Entry and Storing Statistics

it looks simple enough, but i just can't get it to work, the most common error i get is:

Link To Error

i tried setting the dsn to the real name: users, but with no luck.

here is the guts and glory of my login.cfm page:

Link To Code

if anyone has any insite, i would gladly take it, i've been trying to find a solution for a couple days and i'm about ready to give up.

Thanks a lot

Rich  Question

Update: umm i made a link to the error, and code because they didn't show up in the post.

This message was edited by richdaddy on 12-14-03 @ 3:43 PM

Webmaster
12-14-2003 @ 3:43 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Hi,

Try this:

WHERE username = #session.User#

change it to:
WHERE username = '#session.User#'

Remember that alpha/alphanumeric values must be wrapped with single quotes...


Thanks,
Pablo Varando

=====================================================

richdaddy
12-14-2003 @ 3:47 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 20
Joined: Jul 2003

Ok i chamged it, but now the error is

Too few parameters. Expected 1



maquiladoras
12-23-2003 @ 10:04 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002


  <CFQUERY name="login" datasource="#dsn#">
    SELECT *
    FROM Users
    WHERE UserName='#username#'
     AND Pwd = '#pwd#'
  </CFQUERY>


Where are you getting #username# and #pwd# from?


-
"There is no justice, There is Just Us"
-


Website Designed and Developed by Pablo Varando.