For all .NET programmers who are using this
SqlCommand.Parameters.Add("@MyValue","Value");
code in ADO.NET 2.0 will get a deprecation message. Instead of using this code, you need to use the following code
SqlCommand.Parameters.AddWithValue("@MyValue","Value");
this " SqlCommand.Parameters.Add("@MyValue","Value"); " is a ADO.NET 1.1 way of coding, if you are still using this code in ADO.NET 2.0, you will get the following warning message.
" 'System.Data.SqlClient.SqlParameterCollection.Add(string, object)' is obsolete: 'Add(String parameterName, Object value) has been deprecated. Use AddWithValue(String parameterName, Object value). http://go.microsoft.com/fwlink/?linkid=14202' C:\Documents and Settings\501597\My Documents\Visual Studio 2005\WebSites\mytool\MyFirstPage.aspx.cs 149 10 C:\...\doc\ "
This is because of some other API changes in the framework. Checkout the list of obsolete changes in the following links
http://msdn.microsoft.com/netframework/programming/obsoleteapi/ObsByAssembly.aspx
http://www.gotdotnet.com/team/changeinfo/default.aspx
Subscribe to:
Post Comments (Atom)
ASP.NET MVC - Sport Facility Booking system
The project relies on some external service providers. Thus accessing them via their API requires authentication. An API Key need to be su...
-
"The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, II...
-
Excellent outcome by some of the Microsoft Technology community influencers. CAML.NET IntelliSense for SharePoint To build a SharePoint feat...
-
The project relies on some external service providers. Thus accessing them via their API requires authentication. An API Key need to be su...
2 comments:
u r genius ... thnx for the help
Thanks man , saved me a lot of effort
Post a Comment