相关文章
推荐文章
热门文章
用ado+来删除数据
|
<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <html> <script language="VB" runat="server"> Dim MyConnection As SQLConnection Sub Page_Load(Src As Object, E As EventArgs) MyConnection = New SQLConnection("server=YOUR-SERVER;uid=joeuser;pwd=joeuser;database=pubs") If Not (IsPostBack) Sub MyDataGrid_Delete(Sender As Object, E As DataGridCommandEventArgs) Dim MyCommand As SQLCommand MyCommand = New SQLCommand(DeleteCmd, MyConnection) MyCommand.ActiveConnection.Open() Try MyCommand.ActiveConnection.Close() BindGrid() Sub BindGrid() Dim DS As DataSet DS = new DataSet() MyDataGrid.DataSource=DS.Tables("Authors").DefaultView </script> <body style="font: 10pt verdana"> <form runat="server"> <h3><font face="Verdana">Deleting a Row of Data</font></h3> <span id="Message" MaintainState="false" style="font: arial 11pt;" runat="server"/><p> <ASP:DataGrid id="MyDataGrid" runat="server" <property name="Columns"> </ASP:DataGrid> </form> </body> |
| 收藏本文到:天极网摘 新浪VIVI 和讯网摘 博彩中心 365Key网摘 poco网摘 狐摘 亿友响享Yeeyoo igooi-it网摘 5seek网摘 I2Key 我摘网摘 天下图摘 YouNote 百特门 |
