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,

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.

You should encryt and save your password to database to make secure.

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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.