Posted on: 4/25/2013 8:19:32 AM | Views : 305

Public Function Readconnectionstring() As String Try Dim secretkey As String = "Employee" Dim sr As New StreamReader("C:\connection\tcon.txt") Dim Server As String = sr.ReadLine() Dim database As String = sr.ReadLine() Dim userid As String = sr.ReadLine() Dim password As String = sr.ReadLine() sr.Close() Dim ds As String = Decryption(Server, secretkey) Dim db As String = Decryption(database, secretkey) Dim uid As String = Decryption(userid, secretkey) Dim pass As String = Decryption(password, secretkey) cons = "Data Source =" & ds & "; DataBase =" & db & "; User Id =" & uid & "; Password =" & pass & ";" Catch ex As Exception MsgBox(ex.Message) End Try ...

Go to the complete details ...