I have no problem with the coding of sql parameters, but could someone give me an explanation or a good link of why I should use them.
Consider if I had a variable calledI could then do eitherVB Code:
dim strName as String = "John"
orVB Code:
sqlCmd.CommandText = "SELECT * FROM contacts WHERE name = '" & strName & "'"
ThankyouVB Code:
sqlCmd.CommandText = "SELECT * FROM contacts WHERE name = @name" sqlCmd.Parameters.Add(New SqlCeParameter("@name", strName))


Reply With Quote
