问题描述
connectdb1()
conn.Open()
CMD =新SqlCommand(RichTextBox1.SelectedText,conn)
DR = CMD.ExecuteReader
ds =新DataSet()
dtb =新DataTable(" mytable" )
ds.Tables.Add(dtb)
ds.Load(DR,LoadOption.PreserveChanges,ds.Tables( 0 ))
DataGridView1.DataSource = ds.Tables( 0 )
Private Sub Btn_update_Click(ByVal sender As System。 Object ,ByVal e As System.EventArgs)处理Btn_update.Click
****我需要帮助源代码用于更新来自 datagridview
End Sub
如果你想帮助我获取上面的代码,我将非常感激
tank ,,
connectdb1() conn.Open() CMD = New SqlCommand(RichTextBox1.SelectedText, conn) DR = CMD.ExecuteReader ds = New DataSet() dtb = New DataTable("mytable") ds.Tables.Add(dtb) ds.Load(DR, LoadOption.PreserveChanges, ds.Tables(0)) DataGridView1.DataSource = ds.Tables(0) Private Sub Btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_update.Click **** i need help source code for update from datagridview End Sub
I will be very grateful if you want to help me for the code above
tanks,,
这篇关于从datagridview更新数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!