I have the code below that inserts data into a SQL table using Visual Studio 2010. It works perfectly but I had a question concerning the & and + in the Insert Into part of the code.
In my code I used the &, but I've seen online some people use + and I tested my code with + and it also worked fine.
Does it matter which one I use, what is the best practice? Thank you in advance.
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = "Data Source=myserver;Initial Catalog=mydb;Integrated Security=True"
cmd.Connection = con
cmd.CommandText = "INSERT INTO ItemQuote(MasterItemNumber) VALUES ('" & txtMasterItemNo.Text & "')"
MsgBox("Item has been submitted")