开发者

Is DataAdapter a reliable way to Insert data into an SQL Server Database

开发者 https://www.devze.com 2022-12-18 00:56 出处:网络
Yesterday My colleague told me that using data adapter to insert data into an sql server database is not reliable, because it does not guarantee that data are inserted properly. He also told me that i

Yesterday My colleague told me that using data adapter to insert data into an sql server database is not reliable, because it does not guarantee that data are inserted properly. He also told me that if the data insertion is unsuccessful, it does not show any kind of error message.

I am really confused. I thought microsoft invented ado.net so that data can be inserted into the database开发者_如何学运维 without any extra hazard.

What do you guys think? Is data adapter unreliable?


A DataAdapter is just as reliable as using a SqlCommand directly (ie: reliable enough).

It may not be the fanciest way to do this but it has been around for about as long as .NET itself and it is used by very many applications.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号