Solved

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

Posted on 2004-04-27
26
270 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
ID: 10933395
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
ID: 10933862
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
ID: 10933872
I would need to see the code for the authentication part for me to help any further.

FtB
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:mknight9
ID: 10952173
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
ID: 10952340
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
ID: 10953411
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
ID: 10953454
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
ID: 10953498
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
ID: 10953509
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
ID: 10953631
What page is that on?

FtB
0
 

Author Comment

by:mknight9
ID: 10953652
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 10953723
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
ID: 10953734
You can try this:

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


0
 

Author Comment

by:mknight9
ID: 10953745
Any ideas how I solve this problem?

Ian
0
 

Author Comment

by:mknight9
ID: 10953753
sorry disregard the last post.

: )
0
 

Author Comment

by:mknight9
ID: 10953857
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
ID: 10953891
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
ID: 10953945
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
ID: 10954257
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
ID: 10954303
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
ID: 10954324
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
ID: 10954363
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
ID: 10954417
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
ID: 10954444
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
ID: 10954478
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
ID: 10954671
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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query still returning duplicates 5 41
Obtaining data on ASP 8 30
ASP Classic - JavaScript - Get value from form in iFrame and pass to main page. 2 23
Designing forms 3 19
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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