Re: How to have access generate a username and password?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi John,

Thanks for the info. That took care of the error message, however, when I
run the query, it does not pull any information.

"John Spencer" wrote:

Check your syntax on the user of LEFT and RIGHT. The string (or field)
comes first, followed by the number of characters you want returned.

For example,
Left([ScanData.FIRST_NAME],1)


"Justin" <Justin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F82B26EF-06B2-49FF-B146-232C5FC87AE3@xxxxxxxxxxxxxxxx
Thanks for the response. The usernames will also include 4 digits from a
unique ID number to avoid duplicate usernames. I have this information
plugged in to a query, but I can't seem to get it to work. I get the
following error message:

"Data type mismatch in criteria expression"

I've gone back to the table that I am using this query from and all of the
data type fileds are set to text. Am I missing something? Here is the
coding
I am using for the query:

PASSWORD:

LCase(Left(1,[ScanData.FIRST_NAME]) & Left(1,[ScanData.LAST_NAME]) &
Right(4,[ScanData.SOCIAL_SEC_NUMBER]))

USERNAME:

lcase(Left(1,[ScanData.FIRST_NAME] & left(5,[ScanData.LAST_NAME])) &
Right(4,[ScanData.ID_NUMBER]))

Thanks again!



"Ed Warren" wrote:

I presume you mean to say the first letter of the first name and the
first
five letters of the last name.

(works except for the case of Sam Smith and Sally Smith then they both
are
ssmith)!!!

1. username: in a query put the following: lcase(userName:
left(1,[firstName] & left(5,[Lastname]))
2. password: password: lcase(left(1,[firstName])& left(1,lastName) &
right(4,cstr([id]))

Please note, the 'scheme' proposed violates all versions of the 'right'
way
to build username/password pairs.

See the requirements for strong passwords at microsoft.com

Ed Warren.


"Justin" <Justin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AA51C6DD-36A2-46A3-8B04-6F091D02DB49@xxxxxxxxxxxxxxxx
I am trying to generate a username and password from data that I get
from a
query. This information will be located in 2 columns - Username and
Password.
The username will contain the first letter of the first five letters of
the
last name. The password will contain the first letter of the first name
and
the first letter of the last name, followed by the last 4 digits of the
ID
number. I am not sure how to create the expression for this, or if this
should be some sort of validation rule?

I appreciate any help you can provide!






.



Relevant Pages

  • Re: How to have access generate a username and password?
    ... I've gone back to the table that I am using this query from and all of the ... (works except for the case of Sam Smith and Sally Smith then they both ... username: in a query put the following: lcase(userName: ... The password will contain the first letter of the first name ...
    (microsoft.public.access.gettingstarted)
  • Re: PEAR MDB2 - Fatal error: Call to undefined function MDB2_Driver_mssql::getMessage()
    ... the error message for the $result object. ... An error occurred while trying to execute the following query: ... select UserKey from where UserName =? ... Error message: MDB2 Error: syntax error ...
    (comp.lang.php)
  • Re: Oracle SQL Injection vulnerability
    ... The SELECT query doesn't seem to be the one you are injecting since ... likely what you put as a username is stored in a session object and is ... username field and injecting the password field with: ...
    (Pen-Test)
  • RE: How to evade white spaces in a SQL injection
    ... The 2nd one is more likely since they're proably adding the ' character to ... So you'd enter '+1-- as the username. ... +1 tells sql to add 1 to a character field, which it can't do, the -- ... comments out the remainder of the query so it doesn't get parsed. ...
    (Pen-Test)
  • RE: Conditional display of records ...
    ... So in my query, I will map 'A' and 'B' for flag='Y' and userid (with which ... users logon) with the userid stored in table 'B'. ... The trick is to create a function that calls the username function and pass ... Function CheckFlag(strFlag As String) As Boolean ...
    (microsoft.public.access.formscoding)