After using the following code no errors are shown, but my database is not updated once I have made a change using my management system application.
Any recommendations ?
Dim constring As String = Application.StartupPath.ToString() + "\mydatabaseName.mdf"
Public c As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=" + constring + ";Integrated Security=True;User Instance=True"
Sub openConnection()
conn.ConnectionString = c
conn.Open()
End Sub
Use the following code:
Change your connection string to:
Using InitialCatalog helps when there are more than one databases.