Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Am I correct that sqlcommand.Add has been replaced with AddWithValue?

$
0
0

I read that .Add is better than .AddWithValue, yet I also read that.Add has been depreciated.

I use the following AddWithValue.  Is there anything wrong with it?

string strColumnToSaveName = "test";
object objValueToSave = 1;
objCommand.Parameters.AddWithValue((strColumnToSaveName), SqlDbType.Int).Value = objValueToSave;


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>