how can one create a password on a visual basic access database when you have a vb datagrid
First, create a username and password for your MSAccess database (tools> security> set database password)
Next, make the connectionstring with the resulting password.
Then go about your biz, connecting as usual.
In your Microsoft Access database. Go to
tools>security>set database password
Next make the connectionstring with the password you just entered.
It will connect if you did it correcly.
If you want to do it programmatically, set a password column inside your table. Then, if the username and password match, the user should be entering the system. Otherwise, display an error message. Just don't forget to call the table from your datagridview to access interface.
Related
When you click on the 'Generate new password' button, on Kentico's 'User' application's Password tab.
The password is sent out in clear text via email. We want users to change their password the first time they login. Is there any suggestions on how to achieve this?
We use Kentico 11's with ASPX template and I have access to the code and database. I've checked the documentation and there is no built in setting to do this.
Thanks
Another option would be setting some passwords for the users and then setup either password expiration or password policy - so the passwords will not meet one of these and they will be asked to change the password using the password reset.
Create their accounts and set their passwords to a very strong password.
Have the users click "forgot password". This will force the user to change their password, and they won't be able to log in until they go through that process.
I have a SQL Database on Azure to which I can successfully get connected from within an Excel file. I am using ADO and the connection string uses my own username and password. Since this file will be used by many users, how can I create a generic login and password so that I would not give out my own username and password in the code? The Excel file runs many VBA macros to communicate with the Azure SQL database.
I am using Excel 2010 (yeah, it is old, I have to) and this is my connection string:
mstrConnectionString = "Driver={SQL Server Native Client 11.0};" & _
"Server=tcp:<servername>.database.windows.net,1433;" & _
"Database=<databasename>;" & _
"Uid=<myusername>#<servername>;" & _
"Pwd={MyPassword};" & _
"Encrypt=yes;Connection Timeout=30;"
According your comment, I have an idea that you can create a new login/user for you Azure SQL database.
Then you use this user and password as public account to get or writer data from your Azure SQL database within Excel.
Here's the example T-SQL statement, this code is create a new login and a user in your Azure SQL database. You can run this query in SSMS:
--running in master db
USE [master]
GO
CREATE LOGIN [sagarreadonly] WITH PASSWORD='password'
GO
-- running in Azure SQL DB
USE [DataEncryptDemo]
GO
CREATE USER [sagarreadonly] FOR LOGIN [sagarreadonly] WITH DEFAULT_SCHEMA = Marketing;
GO
EXEC sp_addrolemember 'db_owner', 'sagarreadonly';
GO
The new user is created as 'db_owner' to the specified database.
For more details about database roles, please see Database-Level Roles.
About login and user:
A login is used for user authentication
A database user account is used for database access and permissions
validation.
Logins are associated to users by the security identifier (SID). A login is required for access to the SQL Server server. The process of verifying that a particular login is valid is called "authentication". This login must be associated to a SQL Server database user. You use the user account to control activities performed in the database. If no user account exists in a database for a specific login, the user that is using that login cannot access the database even though the user may be able to connect to SQL Server.
A Login is an identity used to connect to a SQL Server instance. A User allows you to log into a SQL Server database and is mapped to a Login. So you will need to first create a Login, before you can create a User in SQL Server.
Hope this helps.
You can create a "Database login" dialog box to prompt a user for database connection information by using text boxes, buttons, or other dialog box controls. Typically, when you type text in a text box, the text appears as you type. However, you can use a property of the Microsoft Visual Basic for Applications (VBA) Edition User Form to create the effect of a hidden or "masked" text box for creating a password dialog box, where you do not want the text that is typed in a text box to be "visible". Here you will find how to do that.
The information the user types on the "Database login" can be used to build the connection string you posted above.
To create a custom dialog in Excel please follow this instructions.
I'm having trouble with Outlook 2016. It's always asking to enter our credentials even if it's supposed to remember it.The password is still valid.
We are also using skype for business but it's NOT linked with outlook (most of the functionalities) and it's using our local network credentials. Outlook is not using the same credential.
I need to know witch file/gpo I need to change to fix it and make sure it really can remember the password.
Thanks
The problem is not with outlook but it's more related to Windows credentials manager.
when you ask Outlook to save your password, this will be saved in your windows credentials, and outlook will reuse it whenever you are opening it.
for some reason when you have to change your account password, outlook will fail to update the one stored in Windows credentials.
Long story short, you will have to open your credentials manager (Start => look for "Credential manager")
Then you need to click on "Windows Credentials" to see a list of all stored credentials in which you wanna look for one that starts with "MS.Outlook", which will represent your saved email information that will be used whenever you open Outlook.
all you have to do is to expand the account details, then click on Edit, and provide the current password for your email account.
after you save the new password, now outlook will not complain anymore about your credentials :)
Curious as to how to compare a text box string to the password the user used to authenticate themselves when they started the Microsoft Access database.
Microsoft Access version is 2003. Users authenticate themselves using Microsoft Access Jet security.
UPDATE: Per CesarGon (thank you), this is really a question of comparing hashed values; how might I replicate the hashing Microsoft Access does and compare the hashes?
In your change password form, you can execute an ado sql command:
ALTER USER user PASSWORD newpassword oldpassword
Just make sure the text entered for both passwords are not the same.
http://msdn.microsoft.com/en-us/library/bb177884.aspx
I don't think you can do that. The passwords that users use for Jet security are hashed and stored in the System.mdw database; the passwords themselves are not stored, but only a hash computed from the password. There is no (practical) way to recover the password from that hash.
Edit. You may use the Jet API to have Jet perform the validation for you. This is some sample code:
'set security database.
DBEngine.SystemDB = "C:\Temp\System.mdw"
'create a workspace.
Set wksp = DBEngine.CreateWorkspace("New", "John", "john's-password")
If the workspace is created, then the provided password was correct. If the password was incorrect, the workspace won't be created and an error will be raised.
I'm trying to let my users connect to OLAP cube in SSAS 2005 using Excel 2007 over the Internet.
I've set up dynamic security using fact table in cube. It uses UserName function, so users should authenticate to SSAS using windows accounts. I've set up msmdpump.dll component on IIS, allowing windows authentication, but not anonimous one. I created windows accounts on web/SSAS server for remote users. My users' machines are out of my control, I can not use pass-through windows authentication.
Now, if I create connection in Excel and save username and password in it, everything works. But I want users to download Excel file without embedded credentials from my web site, and than be able to enter their credentials. Best option is if they will enter password when opening Excel file.
Problem is as soon as I clear checkbox "save password" in connection properties, or remove "User ID"/"Password" properties from connection string, Excel gives me authentication error and does not save connection properties. So I cannot create a template document or connection file without embedded credentials.
Moreover, I suspect, Excel will not ask user for login/password anyway.
Do you know a solution to my problem? Maybe some workarounds/alternative ways? I appreciate any help.
it is really tough to get what you want to work, if at all. I don't think it will work "over the internet" like you want. They would have to be VPN'd in. Their machine doesnt have to be on the network, but they can still pass the AD credentials through.
http://blog.stevienova.com/2008/01/14/how-to-connect-to-sql-server-vs-tfs-etc-using-windows-authentication-when-computer-is-not-on-active-directory-domain-xp-and-vista/
There are other options to expose the cube in some other ways (SSRS, Excel Services, 3rd party OLAP through Web) that would allow you to do what you want.
Here's something that might be worth trying - in your connection string, get rid of the username and password and add 'prompt=1;'. This will force Excel to ask for the user's credentials before it tries to authenticate them, instead of just using empty credentials to do the authentication.