This seemed to work before but now acting up??? Have a VB.NET 2003, windows form, OleDbConnection, due to security need to decrypt connection string pulled from app.config before passing to Access database file. I do this via a call to a function in a module:

Dim EncryptConnectionString As String

EncryptConnectionString = CType(configurationAppSettings.GetValue("OleDbConnection1.ConnectionString", GetType(System.String)), String)

Me.OleDbConnection1.ConnectionString = decrypt(EncryptConnectionString)

Though this used to work seems now to be in a Catch 22 situation. I can enter the code above in the #Region " Windows Form Designer generated code ", but it unsets the dynamic connection property in the IDE. If I set the dynamic connection property in the IDE to map to a key in the app.config file, i.e., OleDbConnection1.ConnectionString, it rewrites the #Region " Windows Form Designer generated code " and erases over the decryption code above.

Any thoughts? Can I do call the decryption outside the Windows Form Designer generated code ?? Any other solutions? VERY IMPORTANT!! ANY RESOLUTIONS, THOUGHTS, GUESSES APPRECIATED Any other way to decrypt a connection string?