Solved

Access Database with single Username for 500 records which each has seperate password not working...!

Posted on 2004-04-27
26
268 Views
Last Modified: 2008-03-17
Hi all.
This may or may not be answered here but I'll try.
I  have a plugin for frontpage called Pageproprotector, which creates a database and login page [asp] (seen here http://www.lgpartnersinc.com) and also adds the code into predesigned pages and changes the file extension to asp.
My client wants a single username with a different password for 500 entries into the Access database which I also had help with (http://www.experts-exchange.com/Applications/MS_Office/Q_20961597.html)

The username and passwords are in but I'm still having problems. None of the logins are working. I've figured it has something to do with the duplicate username coz it recognises the individual username/passwords okay.
This is probably something the suppliers of the frontpage pluginshould answer, but they aint no good. Bloody technical support.

Not sure what I can give you to look at really without giving you all the passwords, so if you think of anything please let me know.
I hope I have explained this clearly.

I will also be posting this question in MS Office coz I ant sure which is the problem.

Ian Hill
0
Comment
Question by:mknight9
  • 14
  • 12
26 Comments
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
I am going to guess the following--if you look in your database and to see what is the first password, it will probably work. The logic is that most algorithms check for a given username, and if a record is returned, it looks at the password field in that record. Of course, you may have 500 records with differing usernames, but the code will only see the first record in the sql select against the database.

Fritz the Blank
0
 

Author Comment

by:mknight9
Comment Utility
Thanks for replying.
I thought of that and that didn't work so i tried the last password... that didn't work either.

The suppliers of the plugin did state that it should work... Quote "Yes, you can do that but each password would be a single record in the database.

Not knowing Access! I wonder have I misinterpreted this.


Ian
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
I would need to see the code for the authentication part for me to help any further.

FtB
0
 

Author Comment

by:mknight9
Comment Utility
HI,
Bit late getting back. I don't mind  you having a look but I don't want to put it on display for all to see. Hope you understand.

I could give you ftp access if you like. I thinks thats the easiest way or If youdon;t need to see that much I can ive you a userrname and password that works.

so, to do this. I would need a email address from you..

It your choice.

Thanks for your elp

Ian
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
mknight9--

If we are going to work on this through EE, all code relevant to the post must be here. Otherwise, we would have to do this outside of EE on a freelance basis.

FtB
0
 

Author Comment

by:mknight9
Comment Utility
Now thats a tight argument : )

What I have done is placed the whole site here

ftp.aworkingdesign.com
username: tracy password: mknight
remote directory: /www/Problem/...

I'll just change the host accout password later.

Thaks

Ian
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
No luck with those credentials. but what I meant was that you need to find the relevant bit of code and then paste it here.

FtB
0
 

Author Comment

by:mknight9
Comment Utility
Sorry bout that. Password is kitcar

Right, okay. hmmm. Could you tell me what kinda thing I am looking for or is that impossible for you say until you have see some pages.

On what page shall I find the code, the login page or maybe a page the login page refers too?

Ian
0
 

Author Comment

by:mknight9
Comment Utility
how about this

<form action="" method="POST" onsubmit="if(this.UserID.value != '' && this.Password.value != '') { return true; } else { return false; }" >
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
What page is that on?

FtB
0
 

Author Comment

by:mknight9
Comment Utility
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
Okay, it is on userid20331.asp and it is just like I said:

  sSelect = "Select [Login].* from [Login] where [UserId] = '" & request.Form("UserId") & "';"
  Set wu_rs = server.CreateObject("ADODB.Recordset")
  wu_rs.Open sSelect, cn, 1, 3, 1
  If not wu_rs.eof then
    If wu_rs("Password")  = request.form("Password")Then
      response.cookies("userid20331") = "True"
      wu_rs.Close
      Set wu_rs = Nothing
      response.redirect sURL
    End If
  End If
End If

So what happens here is that it creates a record set based on the Username, and compares against the very first record in the set (which could be anything since no sort order is given).

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
You can try this:

 sSelect = "Select [Login].* from [Login] where [UserId] = '" & request.Form("UserId") & "' AND [Password]='" & request.form("Password") &"'"


0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:mknight9
Comment Utility
Any ideas how I solve this problem?

Ian
0
 

Author Comment

by:mknight9
Comment Utility
sorry disregard the last post.

: )
0
 

Author Comment

by:mknight9
Comment Utility
I placed what you said as below and it did not work. It gave me a page can't be displayed error.

Select = "Select [Login].* from [Login] where [UserId] = '" & request.Form("UserId") & ";" AND [Password]='" & request.form("Password") &";"
  Set wu_rs = server.CreateObject("ADODB.Recordset")
  wu_rs.Open sSelect, cn, 1, 3, 1
  If not wu_rs.eof then
    If wu_rs("Password")  = request.form("Password")Then
      response.cookies("userid20331") = "True"
      wu_rs.Close
      Set wu_rs = Nothing
      response.redirect sURL
    End If
  End If
End If
0
 

Author Comment

by:mknight9
Comment Utility
HEY

There was a colon missing at:

sSelect = "Select [Login].* from [Login] where [UserId] = '" & request.Form("UserId") & "' AND [Password]='" & request.form("Password") &"'"

between the last " '

(Also the paste above in previous post is my first tweak to your suggestion)

I will experiment a little tonight and awards the points later.

Thank Thanyou
Damn I wish I knew what you now.
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
Learned by hard work and trial and error.

BTW, you don't need to have the trailing semi colon, so I am guessing that something else is wrong here. Please take a look at the table to ensure that I am using the correct field names from the logon table.

FtB
0
 

Author Comment

by:mknight9
Comment Utility
I checked the Logon details and they are all correct.
Will I have problems at any point with the way it is? because it all is all working fine. I have tried a few usernames with different passwords and they have all worked.

So, its seems this is concluded, unless you think otherwise, and I can get the points to you if you don't.

Cheers

Ian
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
If everything seems to work, I guess that we are in a good way.

I don't know this whole package, but from what I can see, this change shouldn't break anything.

Fritz the Blank
0
 

Author Comment

by:mknight9
Comment Utility
Thanks for all your help.

I hope you understand the B Grade.

All the Best

Ian Hill

0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
Uhm, no. Why the grade of B? I picked through all of your code, found the issue, and pointed you in the right direction. If there was a syntax error, so what? I can't test the code because I don't have access to the environment--I can only help those who help themselves along the way.

Please let me know what was missing to make this an A.

FtB


0
 

Author Comment

by:mknight9
Comment Utility
Hi,

Look I am quite happy to change the Grade if I have misinterpreted the grading systems.

Just tell me how.

The reason for the B was, I know nothing about asp and althouh your answer was correct, it did not work until the semi colon was added. Maybe another asker would not of seen that, who knows. But until that was added it didn't work. You say it was not needed, but you did not give me that solution without the semi.

I think I have been right in my choice.

Ian Hill

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

0
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 250 total points
Comment Utility
I'll tell you what. I'll reopen the question and allow you to reconsider. Please keep in mind that none of us who answer questions receive any form of compensation, but rather, volunteer time to help others out. So in a sense, then, you are getting free code from folks who do this for no other reason than to help you along.

Of course, if you want to follow the quidelines, this question would have been worth 500 points....

Fritz the Blank
0
 

Author Comment

by:mknight9
Comment Utility
Sorry bout all this.

I did not want to upset you and I really do appreciate the help and after a little extra thought I could not of completed the job until that was sorted.

My apologises and please don't let me put you off from continuing to answer questions here.

Again all the best

Ian Hill
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
Ian--

Thank you for the grade change.

I think that many don't understand that people answer questions on a volunteer basis, and as such, grade the results as if they were paying for the code and etc. After time, however, everything usually gets sorted out.

I participate here for two main reasons: when I first started learning, people helped me out here so I want to give back; the other reason is that you can learn alot by helping others to solve problems.

See you about,

FtB
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now