HighDots Forums  

Password Field

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Password Field in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
IM12
 
Posts: n/a

Default Password Field - 09-03-2006 , 09:03 PM






I've been using the basic login.asp page along with the "Log In User" SB and
never had a problem. I been trying to use a numeric field in the database for
the password lookup field in the SB but keep getting an error about mis-matched
fields.

So thinking as I do sometimes, I changed the numeric field to a text field
(in the DB) and the login page works great, but then all of the other pages
which rely on this numertic field won't work, well not without redoing them
ALL, and I don't want to redo the entire site.

Is there anyway I can use a numeric field for the password lookup?:confused;


Reply With Quote
  #2  
Old   
jasan3114
 
Posts: n/a

Default Re: Password Field - 09-03-2006 , 09:28 PM






Shouldn't "text" include numeric inputs as well. If you specify as field as text it should accept both text and numeric inputs as valid data. What db are you using.
Regards

Reply With Quote
  #3  
Old   
IM12
 
Posts: n/a

Default Re: Password Field - 09-04-2006 , 10:42 PM



You would think so but no. I'm using Access 2000 db.

I think it has to do with how the SB is writing the "text" field on the login
page. I'm not sure but if I get rid of some of the ' s in the coding it might
work. I also checked a couple of sites and it seems to be an ongoing problem.


Reply With Quote
  #4  
Old   
bregent
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 12:40 PM



It's been a while since I've used this behavior but IIRC, the behavior assumes
the password field is text and creates the script with that in mind. You would
have to modify the DW created code and change the text fields to numeric. But I
have to ask why you are using a numeric field for a password? It's not very
secure.


Reply With Quote
  #5  
Old   
bregent
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 12:41 PM



Quote:
If you specify as field as text it should accept both text and numeric inputs
as valid data.

Of course not. SQL syntax for text and numeric fields are different - text
fields must be enclosed in quotes.



Reply With Quote
  #6  
Old   
jasan3114
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 01:22 PM



[q]Originally posted by: bregent
Quote:
If you specify as field as text it should accept both text and numeric inputs
as valid data.

Of course not. SQL syntax for text and numeric fields are different - text
fields must be enclosed in quotes.[/q]

Ofcourse text fields are enclosed in quotes. What I meant was that if the
password field is text and someone uses a numeric password or a mix of text and
number, that would work too, but not vice versa..
So if IM12 specifies the field as text I could put in my password as "123pass"
and there would be no validation error. But if the password field is
numeric, there would be a mismatch



Reply With Quote
  #7  
Old   
bregent
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 01:42 PM



Quote:
What I meant was that if the password field is text and someone uses a numeric
password or a mix of text and number, that would work too, but not vice
versa..

No. The OP defined the database column as numeric. DW creates sql code as
text. This results in a type mismatch.



Reply With Quote
  #8  
Old   
jasan3114
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 01:52 PM



[q]Originally posted by: bregent
Quote:
What I meant was that if the password field is text and someone uses a
numeric
password or a mix of text and number, that would work too, but not vice
versa..

No. The OP defined the database column as numeric. DW creates sql code as
text. This results in a type mismatch.[/q]

All I said was that a text field will accept both text and numeric inputs.



Reply With Quote
  #9  
Old   
bregent
 
Posts: n/a

Default Re: Password Field - 09-05-2006 , 01:58 PM



Quote:
All I said was that a text field will accept both text and numeric inputs.
OK, gotcha.


Reply With Quote
  #10  
Old   
IM12
 
Posts: n/a

Default Re: Password Field - 09-06-2006 , 01:36 PM



I understand the security issue here but the object for this login is to allow
buyers to view purchases from their email address and various purchase orders.

I'm not a programmer but I think the fix is to remove any one-of-a-number of
quotes the SB created, I'm just not sure which ones.

MM_rsUser.Source = MM_rsUser.Source & " FROM Orders WHERE Email='" &
Replace(MM_valUsername,"'","''") &"' AND ControlNumb='" &
Replace(Request.Form("ControlTXT"),"'","''") & "'"



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.