I'm having some issues with inserted data being overwritten by the next transaction (if done within a relatively short amount of time, say, roughly several seconds).
I believe this may be related to how I'm exectuing the SQL in code. I have posted below an example of how I'm connecting. My concern is that this is not the correct way to do this. I am using a stored procedure to insert the data, but it does not seem to be the problem, because I have no issues when executing the commands simultaneously using SQL Managment Studio.
Is this an issue with all of the commands using the web.config file's connection string?
Is it an issue with the code I'm using to connect?
Dim InsertQuery As String = "INSERT USING STORED PROCEDURE"
'Conn.ConnectionString points to the webconfig file's connection string
Using myConnection As New System.Data.SqlClient.SqlConnection(Conn.ConnectionString)
Using myCommand As New System.Data.SqlClient.SqlCommand(InsertQuery, myConnection)
Dim retvalue As Integer
retvalue = myCommand.ExecuteNonQuery()