Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
i am trying ti build a win forms application with vb 2010
and have a .mdb database which is password protected and is a data source in app which means connection string is read only and if i want to change it, i should modify connection in server explorer.
the problem is i modify connection (set password) in server explorer and then test the connection and it say there is no problem and works ok. i can change query and everything in vb.
but when i try to build the app there is this error :
VB
{"Not a valid password."}


tried persist security info true and false but no luck
i am 100% sure the properties of connection are right but the problem is vb doesnt put password in the connection string

what should i do ?
tnx in advance
Posted

1 solution

found it !
u should modify connection on start of the program like this :
VB
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load

    My.Settings.Item("ConnectionStringName") = "TheConnectionString;"

End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900