I have the following code, it executes without any error and even reports that 1 row was affected. However, nothing is saved. Why not? i can retrieve from the database though.. but cannot write
Dim SQLConn As New SqlConnection() 'The SQL Connection
SQLConn.ConnectionString = connstring 'Set the Connection String
SQLConn.Open()
Dim SQLCmd As New SqlCommand() 'The SQL Command
Dim SQLStr As String = "INSERT into region_table VALUES(10,23,4,'test')"
SQLCmd.CommandText = SQLStr
sqlCmd.ExecuteNonQuery()
SQLConn.Close()
SOLUTION:: Open right click on database connection in server explorer, Select Properties And use that Connection String! Hopes this solves anyone else's problem too :D