In VB.NET we are adding sql parameters without the @ sign and application is working fine:
cmd.Parameters.Add("in_id", SqlDbType.Int).Direction = ParameterDirection.Input
This page says syntax for parameter placeholders depends on the data source and System.Data.SqlClient
uses named parameters in the format @parametername
.
We are porting the code from Oracle and the same page says for System.Data.OracleClient
it uses named parameters in the format :parmname (or parmname)
, which means the colon is not required.
The page does not explicitly say parameters without @ sign is OK for the Data.SqlClient
.
Is the @ sign required before the parameter name (input or output parameter) when using the Data.SqlClient
?