Page 1 of 1

Formatting Field

PostPosted: Fri Nov 25, 2016 3:56 am
by HackinHoodLogicsTm
Hi Neobookers.

Please is there a way i could format my database field with ******* to display as password characters because the field contains Password for my users.

I mean this in the Grid Display. For the Textbox it's simple to change that but in the Grid display i don't know how.

I would be glad and appreciate any responds.

Thank you.

Re: Formatting Field

PostPosted: Fri Nov 25, 2016 8:10 am
by Gaev
HackinHoodLogicsTm:
is there a way i could format my database field with ******* to display as password characters
this in the Grid Display. For the Textbox it's simple to change that but in the Grid display i don't know how.

Why even show the field (column) in the grid if every row-cell in this column is going to show as **** ? ... Hide the field from being displayed in the Grid by using dbpSetColumnOrder (omit the field in question) or dbpSetFieldProperties (set "Visible=No")

Re: Formatting Field

PostPosted: Tue Nov 29, 2016 6:24 am
by stu
If your passwords were stored the way they should be getting stored then it shouldn't be a problem to display that string at all. Not like that's a good idea either, just saying.

Re: Formatting Field

PostPosted: Thu Dec 01, 2016 3:14 am
by HackinHoodLogicsTm
Sorry for the Delay.

Thank you guyz...

I already did that (Hiding the column)

but i taught there was a way to display the string as Password characters (*******)

Thanks

Re: Formatting Field

PostPosted: Thu Dec 01, 2016 6:25 am
by Gaev
HackinHoodLogicsTm:

i taught there was a way to display the string as Password characters (*******)

LOL ... if you really want to "simulate" this ...

1) Create a dummy field (e.g. FakePassword)

2) Populate it each time a record is created or updated ... use the "subroutine" option in dbpOpenTable to force the value of this FakePassword field to be as many stars as the length of the "real password string"

3) Display the column for FakePassword

Re: Formatting Field

PostPosted: Thu Dec 01, 2016 1:26 pm
by dpayer
HackinHoodLogicsTm wrote:I already did that (Hiding the column)
but i taught there was a way to display the string as Password characters (*******)
Thanks


Hiding something with ****** is a method built into browsers so typed letters can't be seen. Databases store data. You decide how to show the data.

Having said this, there may be a more secure way to keep password information in a database. When a person submits a password at registration, you can use a hash program to create a one way hash (representation) of the password entry. This hash cannot be reverse engineers to get the original password.

When you have someone enter their credentials at login, hash that entry and COMPARE it to the hash you have in your database. If the two match, allow access. This way, you don't store ACTUAL passwords in your database. You store symbols of the password and you compare the generated symbol (hash) of the entered password to that of the stored one.

Much more secure. Here is a NB function that can be used to hash passwords viewtopic.php?t=19229