如何使用OracleDataReader?
如何使用OracleDataReader?
1. 在datagrid里创建4个BoundColumn和一个LinkButton。
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 110; LEFT: 16px; POSITION: absolute; TOP: 168px"
Visible="True" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="ID" HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM1" HeaderText="NUM1"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM2" HeaderText="NUM2"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM3" HeaderText="NUM3"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" HeaderText="Edit!" CancelText="Cancel"
EditText="Edit"></asp:EditCommandColumn>
</Columns>
</asp:DataGrid>
2. datagrid通过OracleDataReader获得数据
Dim Orclcnn As OracleConnection
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 110; LEFT: 16px; POSITION: absolute; TOP: 168px"
Visible="True" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="ID" HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM1" HeaderText="NUM1"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM2" HeaderText="NUM2"></asp:BoundColumn>
<asp:BoundColumn DataField="NUM3" HeaderText="NUM3"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" HeaderText="Edit!" CancelText="Cancel"
EditText="Edit"></asp:EditCommandColumn>
</Columns>
</asp:DataGrid>
2. datagrid通过OracleDataReader获得数据
Dim Orclcnn As OracleConnection