0

I am using MS-Access & VB.Net

I want to change Database password which use for connection string in Vb.Net forms
(DB password change using, Open DB through MS-Access)

For the beginning I used My.setting to save password and retrieve it from project load, but it not secure. My.Setting files easily can open through even Notepad.

Is there any way to do this,

6
Contributors
5
Replies
22
Views
3 Years
Discussion Span
Last Post by Dili1234
0

Don't put the password in MySetting in the first place. Hardcode the password inside your program when connecting to the db, or prompt for password then put the text in the connection string.

0

save it inside your program by creating a class

Public Class CommonMethods
    Public Sub GeneralInsertIntoUserTable(ByVal user As String, ByVal password As String)
        Dim connection As New OleDb.OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Data\Data.mdb;")
        Dim command As New OleDb.OleDbCommand(String.Format("INSERT INTO tblUser User, Password VALUES (@1, @2)", user, password), connection)
        connection.Open()
        command.ExecuteNonQuery()
        connection.Close()
    End Sub
End Class
0

You should use a database for your password rather than hardcoding. So if your app and there is need for a password change, you wont have to do some coding over again.

0

Createa form to hold the password and limit the authorztion to access the form or to edit t form

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.