I have an existing Class Library application (.Net Framework 4) that uses the Microsoft.Practices.EnterpriseLibrary.Data DLL (v2.0.50727) and I'm getting confused on something.
There's a function in the code that writes records to a SQL table. This function is referenced by a Windows Form Application.
The following resides in the function:
Dim idcConnection As IDbConnection = Nothing
Dim idtTransaction as IDbTransaction = Nothing
Dim dcInsertUpdate As DbCommand = Nothing
Dim db as Database = DatabaseFactory.CreateDatabase()
dcInsertUpdate = db.GetStoredProcCommand("spInsertUpdateNote")
db.AddInParameter(dcInsertUpdate, "@NoteType", DbType.String, NoteType)
db.AddInParameter(dcInsertUpdate, "@DeptID", DbType.Int16, DeptID)
db.AddParameter(dcInsertUpdate, "@NoteID", DbType.Int32, ParameterDirection.InputOutput, "@NoteID", DataRowVersion.Current, NoteID)
idcConnection = db.CreateConnection()
After the CreateDatabase() executes and I hover over the variable "db" the Connection String values are encrypted.
When the folllowing executes:
idcConnection = db.CreateConnection()
I get a
Format of the initialization string does not conform to specification starting at index 0.
error because of the encrypted connection string. How and/or what in the application is telling it to encrypt the data? And how do I remedy that?
There is no app.config file in the Class Library application so is it getting what it needs from the Windows Form application that's referencing it?