GridView ASPX卡在多SQL问题上 [英] Gridview ASPX Stuck on multi sql issue
本文介绍了GridView ASPX卡在多SQL问题上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
查看更多:ASP.NET大家好
我正在尝试在gridview中进行更新,并且在gridview运行更新查询的同时,我想将相同的值插入到新表中.
我是新手,这就是我正在想的...
See more: ASP.NET Hi Guys
I am trying to do an update in a gridview, and at the same time as the gridview runs the update query I want to insert the same values into a new table.
I am knda new, this is what I am figuring...
Collapse | Copy Code<script runat="server">
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
If AccessDataSource1.UpdateCommand = "UPDATE tbl SET page = ? where id=?" Then
AccessDataSource1.InsertCommand = "INSERT tbl2 blah = ? where id=?"
End If
End Sub
</script>
但没有做到.
我做错了什么?
(xx Ami xx)
but it doesn''t do it.
What am I doing wrong?
(xx Ami xx)
推荐答案
在selectedindexchanged事件中
ds = new datatable()
ad = new sqldataadapter("update query",con);
ad.fill(ds)
ds1 = new datatable()
ad1 = new sqldataadapter("update query",con);
ad1.fill(ds1)
试试这个
in selectedindexchanged event
ds=new datatable()
ad=new sqldataadapter("update query",con);
ad.fill(ds)
ds1=new datatable()
ad1=new sqldataadapter("update query",con);
ad1.fill(ds1)
try this
这篇关于GridView ASPX卡在多SQL问题上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文