G
greg
Hi.
I was recently talking to a colleague who uses SQL Server as a backend to
his applications. He mentioned that adding parameters causes SQL Server to
determine the datatype and can cause performance issues, unless you
explicitly specify the datatype.
Does this also apply to Oracle, and if so, how can I specify it? Right now I
am doing the following:
int a = 4;
String b = "test";
DateTime today = System.DateTime.Today;
String sql = "insert into something (a, b, c) values a, :b, :c)";
OracleCommand aCommand = ... using above sql ...
aCommand.Parameters.Add("a", a);
aCommand.Parameters.Add("b", b);
aCommand.Parameters.Add("c", c);
Is there another way I could be doing this that would speed things up?
I was recently talking to a colleague who uses SQL Server as a backend to
his applications. He mentioned that adding parameters causes SQL Server to
determine the datatype and can cause performance issues, unless you
explicitly specify the datatype.
Does this also apply to Oracle, and if so, how can I specify it? Right now I
am doing the following:
int a = 4;
String b = "test";
DateTime today = System.DateTime.Today;
String sql = "insert into something (a, b, c) values a, :b, :c)";
OracleCommand aCommand = ... using above sql ...
aCommand.Parameters.Add("a", a);
aCommand.Parameters.Add("b", b);
aCommand.Parameters.Add("c", c);
Is there another way I could be doing this that would speed things up?