I need to convert some code which passes the parameters value to SqlCommand. I can't explain this in words. so, let me take an example.
Eg:
Currently i am doing this,
Dim value1 As String = "Reference Value 1"
sql_command = New SqlCommand(query, Cn)
sql_command.Parameters.AddWithValue("@Reference1", value1)
and i want to convert the last line and the resultant code will be as below
Dim value1 As String = "Reference Value 1"
sql_command = New SqlCommand(query, Cn)
command.Parameters.Add("@Reference1", SqlDbType.VarChar);
command.Parameters["@Reference1"].Value = value1 ;
I need to change similar kind of stuff in more than 400 files so is there any other way or shortcut or something like this so that i can save my time.
Also one more thing, if we implement like this then it will increase the performance?
ctrl+hto replace, but thisis only going to work if all code looks the same