Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Databinding to a password protected access database

4 views
Skip to first unread message

Bill

unread,
Dec 3, 2008, 7:59:21 PM12/3/08
to
Hello all,
I have been searching on the net for a
solution for days and have tried many different ways to no avail..:(

Here is my project using VB 2008...

I have an MS Access database with a password, a Main form with a
BindingNavigator, a Bbindingsource, a DataViewGrid, and a Login form with
two textboxes..
I have connected all except the login form. The project works well when I
store the password in the connection string through the
database wizard. The wizard adds a DataSet, and a TableAdapter.

I Do Not want to store the password in the connection string. I want to use
the Login form to enter the User ID and User Password for the database.

How do I use the info entered by the user in Login form to connect to the
database where UsernameTextBox.text = dbUserID and PasswordTextBox.text =
dbPassword

1) Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
2) 'TODO: This line of code loads data into the 'DataSet.tblMylist' table.
You can move, or remove it, as needed.

3) Me.TblMylistTableAdapter.Fill(Me.DataSet.tblMylist)

4) End Sub

The program stops at line 3 with the error 'Not a valid Password'

Before you ask, yes it is a valid password because I have accessed the
database outside of VB using the same password.

I would like to be able to pass the dbUserID and password variables to the
connection string so that when the program gets to line 3 it opens

up the Main form and populates the DataViewGrid with the data in the
database table.

I would also like to be able to change the database password at run time by
clicking a Change Password button ...

One would think that Microsoft would automatically include a login form with
the proper parameters in the database wizard when a

person selects not to store sensitive data in the connection string... If
they did well I haven't found it

I hope that I presented my problem clearly enough for someone out there to
be able to help. If not please ask and I will try again.

Michael Cole

unread,
Dec 3, 2008, 9:25:53 PM12/3/08
to
Bill <fire...@shaw.ca> wrote in message
<news:uufPquaV...@TK2MSFTNGP06.phx.gbl>

> Hello all,
> I have been searching on the net for a
> solution for days and have tried many different ways to no avail..:(
>
> Here is my project using VB 2008...

You need to ask in a .NET newsgroup. This group caters only for VB versions
6 and earlier - VB.NET is completely different. Look for newsgroups with
"dotnet" in their name.


--
Regards

Michael Cole


0 new messages