开发者

.NET - Is it possible to write a DataTable directly to a SQL Database?

开发者 https://www.devze.com 2023-01-10 00:44 出处:网络
I\'d like开发者_JS百科 to do something like the following: Dim Conn as new SqlConnection(ConnectionString)

I'd like开发者_JS百科 to do something like the following:

Dim Conn as new SqlConnection(ConnectionString)

MyDataTable.WriteToDB(Conn, "New Table")

Are there any shortcuts like this built into .NET?

Thanks


You probably want to start with the SqlDataAdapter class. It was pretty much designed to do exactly this.

0

精彩评论

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