case sensitive compare password when found the id with dlookup - excel

I want a code to lookup for a username and compare the password ( case sensitive ) using the dlookup
here is my code and it doenst care for the pass if it is capital letter nor not
If (IsNull(DLookup("UserName", "UserID", "UserName='" & Me.Userbox.Value & "'and [password] = '" & Me.Passbox & "'"))) Then
Thanks

Related

VBA Replace() Function with Multiple Strings in Same Cell

I am writing a macro send multiple emails that are customized based on the data required.
For example:
Subject: <name>, Thank you for visiting <store>
At the moment, I can only pull , but I have no idea how to also add so 'Content' will both of them.
Content = Replace(msg.Subject, "<name>", first_name + " " + last_Name)
Replace(msg.Subject, "<store>", store_name)
^ essentially I want to combine both of these so the macro will pull both.
You can do it in multiple steps:
Content = Replace(msg.Subject, "<name>", first_name + " " + last_Name)
Content = Replace(Content, "<store>", store_name)
Or you could nest your Replace statements:
Content = Replace(Replace(msg.Subject, "<name>", first_name + " " + last_Name), "<store>", store_name)
If you ended up with a large number of tokens to replace (or an ever growing dynamic number of them) then you could get fancy and iterate through the string to identify tokens and swap them out inside the loop, but that would be overkill here.

What does it mean?

string query = "SELECT *
FROM users
WHERE username = "'" + username + "'
AND password = '" + password + "'";
Since this query is constructed by concatenating an input string directly from the user, the query behaves correctly only if password does not contain a single-quote character. If the user enters
__"
joe
"
as the username and
"
example' OR
'a'='a
as the password, the resulting query
becomes__
I want to know what the single quote character means

INVALID_TOKEN_FORMAT

I am just looking into integration options and have setup a dev account and am working on the basic login_information endpoint. I have followed the documentation and tried using the XML and JSON options when setting the headers.
Both return the same message:
XML:
<errorCode>INVALID_TOKEN_FORMAT</errorCode>
<message>The security token format does not conform to expected schema.</message>
JSON:
{
"errorCode": "INVALID_TOKEN_FORMAT",
"message": "The security token format does not conform to expected schema."
}
I have made another token and tried that, I have also checked that there is no backslash (\) character in my password. I have tried with the API Username and my email address. The Tokens both have 32 characters and 4 (-) and are being submitted as utf8.
The XML GET:
Headers:
BE_HTTP_Set_Custom_Header (
"X-DocuSign-Authentication:" ;
"<DocuSignCredentials>
<IntegratorKey>" & integrator_key & "</IntegratorKey>
<Username>” & username & ”</Username>
<Password>” & password & ”</Password>
</DocuSignCredentials>"
)
Where the quote data e.g. “ & integrator_key & “ is pulling the data from the database.
BE_HTTP_Set_Custom_Header ( "Content-Type" ; "application/xml" )
GET:
BE_GetURL (
"https://demo.docusign.net/restapi/v2/login_information?api_password=true&include_account_id_guid=true&login_settings=all" ; "" )
The JSON GET:
Headers:
BE_HTTP_Set_Custom_Header (
"X-DocuSign-Authentication:" ;
"{
\"Username\":\"” & username & ”\",
\"Password\":\"” & password & ”\",
\"IntegratorKey\":\"" & integrator_key & "\"
}"
)
Where the quoted data e.g. “ & integrator_key & “ is pulling the data from the database, here I need to escape the " of the JSON with the \ e.g. \".
BE_HTTP_Set_Custom_Header ( "Content-Type" ; "application/json" )
GET:
BE_GetURL (
"https://demo.docusign.net/restapi/v2/login_information" ; "" )
The login_information method is used to obtain information about a user only when you're using Legacy Authentication.
You should first decide if you're writing a User App (where the user will be present to authenticate herself) or a Service Integration that will run autonomously in the background.
Then use the appropriate authentication.
A beta recipe that demonstrates both authentication models.
Added
Check that your password doesn't include a reserved XML character that needs to be escaped. < and & need to be replaced with the appropriate entity sequence.
And try authenticating with your email, pw, and integration key via the recipe referenced above. If it works, then the problem is in your code. If it doesn't work then something's wrong with your credentials.
Also, check that when you add an http header that you should include the colon with the header key value.

Is there a Lotus view formula to find mails which were sent outside of the local domain?

Somehow my corporate email address has found its way onto a spam/phish list. I suppose it's unavoidable, but I can't think of any time that I've sent an email to an external address and I'm very curious to know how it could have 'escaped'.
I would like to create a SELECT formula to find any mails where one or more recipients are external (ie. do not end with '#mycompany.com', '#mycompany.com>' or '/MYCOMPANY/COM'.
I've used '#Contains' in other queries, but #Contains and #Ends don't really do the job here. If they returned a count of the number of matches, then I could compare it to the total number of recipients. Any mails where these totals are unequal will be the ones I'm looking for. But they only return booleans.
I would do it like this (do NOT mix MYDOMINODOMAIN with /MYCOMPANY/COM):
_myDomains := #Lowercase("MYDOMINODOMAIN" : "mycompany.com" : "mycompany.net");
_mailRecipientString := #LowerCase(#ReplaceSubstring(SendTo : CopyTo : BlindCopyTo : Recipients; #Char(13) : #Char(9) : #Char(34) : #Char(39) : "," : "<" : ">" : "\"" : " " ; " "));
_mailRecipientValues := #Explode(#Implode(_mailRecipientString;" "); " "; #False);
_mailDomains := #Unique(#Trim(#Explode(#Implode(#Word(_mailRecipientValues; "#"; 2); " "); " "; #False)));
SELECT #Trim( #Replace( _mailDomains ; _myDomains ; "" ) ) != ""
What does this formula do?
Every address in SendTo, CopyTo, BlindcopyTo and (this is for paranoia as it contains the three former) Recipients ALWAYS has an #. I get the domains of this addresses using #Word.
Then I replace the "good" domains in this list with an empty string (#Lowercase to be sure). If the result is something different than the empty string -> Found one

How to get the substring from a String in ColdFusion

How can I get the Substring in Coldfusion?
ex:- following is the String "Update Tablename set value=something where value2=thisone"
I want to get the Table name from the Str
how is it possible?
Note:- Table name is dynamic(i.e may be any charecters).
Thanks
updated:
You can probably use result = ListToArray(sql , " ") and then use the result[2]
also i believe you can do ListGetAt(sql, 2, " ")

Resources