修改记录

Size: px
Start display at page:

Download "修改记录"

Transcription

1 ASP.NET ADO.NET ASP ADO ADO ADO.NET Managed Provider (API) OLEDB ODBC ADO.NET Managed Provider DataSet Managed Provider ADO ADO.NET ADO.NET Managed Provider Managed Provider DataSet MS SQL Managed Provider Connection Command Parameter DataSet DataSetCommand DataSet IdataReader DataSetCommand ADO.NET

2 DataSet DataSet DataSetCommand SQL Command SelectCommand InsertCommand UpdateCommand DeleteCommand Managed Provider OLEDB COM Interop OLEDB Managed Provider DataSet DataSet ADO.NET DataSet DataSet DataSet TablesCollection DataSet (Table) DataTable DataSet DataTable DataTable TablesCollection DataTable System.Data (Table)

3 ColumnsCollection RowsCollection DataTable DataTable DataTable RelationsCollection DataTable DataRelation DataRelation RelationsCollection DataSet DataRelation - DataTable DataRelation ASP DataShaping ExtendedProperties asp.net Managed Provider DataSet asp.net DataSet DataSet Managed Provider ADO.NET ADO.NET ADO.NET ADO ASP ADO 1 ADO.Connection 2 SQL Recordset 3 4 ADO.NET ADO.NET DataSet DataSet

4 DataSet ASP (Conne Recordset) DataSet DataSet ADO.NET DataSet 2 DataSet DataSet DataSet XML XML DataSet ADO.NET ADOConnection ADO.NET ADOConnection ADODB.Connection ADOConnection ADO.NET NameSpace System.Data System.Data.ADO ASP.NET Import <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> ADO Connection ADOConnection Open Close MS SQL Server Pubs <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <% '... Dim strconnstring as String strconnstring = "Provider=SQLOLEDB; Data Source=(local); " & _ "Initial Catalog=pubs; User ID=sa" ' ADOConnection Dim objconn as ADOConnection objconn = New ADOConnection ' ADOCOnnection objconn.connectionstring = strconnstring

5 objconn.open() ' ' objconn.close() ' objconn = Nothing ' %> ADO ADO.NET ADO SQL ADO ADODatasetCommand ADO.NET ADODatasetCommand DataSet ADO.NET Dataview DataSet DataSet Dataview DataSet ADODatasetCommand DataSet ' SQL Dim strsql as String = "SELECT * FROM authors" ' ADODatasetCommand Dataset Dim objdscommand as ADODatasetCommand Dim objdataset as Dataset = New Dataset objdscommand = New ADODatasetCommand(strSQL, objconn) ' Dataset ' "Author Information" objdscommand.filldataset(objdataset, "Author Information") Dataset Dataset ASP.NET DataSet DataGrid ASP.NET HTML <asp:datagrid id="datagridname" runat="server"/> Dataset DataGrid ASP.NET Dataview DataGrid Dataset

6 Dataset Dataview DataGrid MyFirstDataGrid.DataSource = _ objdataset.tables("author Information").DefaultView MyFirstDataGrid.DataBind() (code\ aspx) <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <% '... Dim strconnstring as String strconnstring = "Provider=SQLOLEDB; Data Source=(local); " & _ "Initial Catalog=pubs; User ID=sa" ' ADOConnection Dim objconn as ADOConnection objconn = New ADOConnection ' ADOCOnnection objconn.connectionstring = strconnstring objconn.open() ' ' SQL Dim strsql as String = "SELECT * FROM authors" ' ADODatasetCommand Dataset Dim objdscommand as ADODatasetCommand Dim objdataset as Dataset = New Dataset objdscommand = New ADODatasetCommand(strSQL, objconn) ' Dataset ' "Author Information" objdscommand.filldataset(objdataset, "Author Information") objconn.close() ' objconn = Nothing '

7 Authors.DataSource = _ Authors.DataBind() objdataset.tables("author Information").DefaultView %> <HTML> <BODY> <asp:datagrid id="authors" runat="server"/> </BODY> </HTML> ADO.NET pubs authors DataSet DataGrid DataSet

8 ADO.NET Web ASPX IP ASPX Application( strconn ) global.asa Application DbOpen ASP DbOpen ASP ASP.NET ASP.NET ASP.NET ASP.NET ASP ASP.NET Application config.web config.web (config.web) <configuration> <appsettings> <add key="strconn" value="server=localhost;uid=sa;pwd=;database=pubs"/> </appsettings> </configuration> aspx Dim MyConnection As SQLConnection Dim Config as HashTable config.web appsettings Config = Context.GetConfig("appsettings") Config MyConnection = New SQLConnection(Config("MyConn")) config.web

9 3.3.2 ASP.NET ADO.NET SQL Managed Provider ASP.NET 1 ADO.NET Managed Provider 2 SQL Managed Provider ODBC OLEDB MS SQL Server MS SQL Server ADO.NET Managed Provider ODBC MS SQL Server pubs DSN >> >>(ODBC)>> MS SQL Server pubs <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <script language= VB RunAt= Server > ' ADOConnection Dim objconn as ADOConnection=New ADOConnection( DSN=pubs )

10 objconn.open() ' </script> Import ADO.NET Namespace ADO.NET Managed Provider+ODBC MS SQL Server Access Excel mysql Oracle Page Language="vb" %> Import Namespace = "System.Data" %> <%@ Import Namespace = "System.Data.ADO" %> <html> <head> <script runat=server> Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs) On Error Resume Next Dim cn As ADOConnection cn = New ADOConnection("DSN=NWind") cn.open() If cn.state = 1 Then lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Succeeded" Else lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Failed" End If End Sub </script> </head> <body> <asp:label id="lblreturncode" Runat=server /> </body> </html> ADO.NET Managed Provider OLEDB OLEDB Access

11 Import Namespace="System.Data" %> Import Namespace="System.Data.ADO" %> <script language= VB RunAt= Server > Dim cn As ADOConnection cn = New ADOConnection("provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;") cn.open() </script> MS SQL Server <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <script language= VB RunAt= Server > Dim cn As ADOConnection cn = New ADOConnection("Provider=SQLOLEDB.1;Data Source=(local);uid=sa;pwd=;Initial Catalog=pubs ) cn.open() </script> ADO.NET OLEDB OLEDB SQLOLEDB SQL OLE DB Provider MSDAORA Oracle OLE DB Provider JOLT Jet OLE DB Provider MSDASQL/SQLServer ODBC SQL Server ODBC Driver via OLE DB for ODBC Provider MSDASQL/Jet ODBC Jet ODBC Driver via OLE DB Provider for ODBC Provider ( thado.htm ) <%@ Page Language="vb" %> <%@ Import Namespace = "System.Data" %> <%@ Import Namespace = "System.Data.ADO" %> <html> <head> <script runat=server>

12 Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs) On Error Resume Next Dim cn As ADOConnection cn = New ADOConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb;") cn.open() If cn.state = 1 Then lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Succeeded" Else lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Failed" End If End Sub </script> </head> <body> <asp:label id="lblreturncode" Runat=server /> </body> </html> SQL Managed Provider Microsoft SQL Server SQL Managed Provider MS SQL Server <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <script language= VB RunAt= Server > Dim objconn as SQLConnection = New ADOConnection("server=localhost;uid=sa;pwd=;database=pubs;") objconn.open() ' </script> 1 Import ADO.NET Managed Provider Import System.Data.ADO System.Data.SQL 2 ADO.NET Managed Provider ADO SQL

13 ADO.NET Managed Provider ADO.NET SQL Managed Provider System.Data.ADO System.Data.SQL Namespace Connection ADOConnection SQLConnection Command ADODatasetCommand SQLDatasetCommand Dataset Dataset Dataset DataReader ADODataReader SQLDataReader String sconnectionstring = "Provider= SQLOLEDB.1; Data Source=localhost; uid=sa; pwd=; Initial Catalog=pubs"; ADOConnection con = new ADOConnection(sConnectionStri ng); con.open(); SQL ADOCommand cmd = new ADOCommand("SELECT * FROM Authors", con); ADODataReader dr = new ADODataReader(); cmd.execute(out dr); ADOCommand cmd = new ADOCommand ("spgetauthorbyid", con); cmd.commandtype = CommandType.StoredProcedure; String sconnectionstring = "server=localhost;uid=sa;pwd=;database =pubs"; SQLConnection con = new SQLConnection(sConnectionString); con.open(); SQLCommand cmd = new SQLCommand(("SELECT * FROM Authors", con); SQLDataReader dr = new SQLDataReader(); cmd.execute(out dr); SQLCommand cmd = new SQLCommand("spGetAuthorByID", con); cmd.commandtype = CommandType.StoredProcedure; ADOParameter prmid = new ADOParameter("AuthID", ADODataType.VarChar, 11); prmid.value = " "; cmd.selectcommand.parameters. Add(prmID); ADODataReader dr; cmd.execute (out dr); SQLParameter prmid = new SQLParameter("@AuthID", SQLDataType.VarChar,11); prmid.value = " " cmd.selectcommand.parameters.add(pr mid); SQLDataReader dr; cmd.execute(out dr); <%@ Page Language="vb" %> <%@ Import Namespace = "System.Data" %> <%@ Import Namespace = "System.Data.SQL" %> <html> <head> <script runat=server> Sub Page_Load(ByVal Sender As Object, ByVal e As EventArgs) 'On Error Resume Next Dim cn As SQLConnection

14 cn = New SQLConnection("server=localhost;uid=sa;pwd=;database=pubs;") cn.open() If cn.state = 1 Then lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Succeeded" Else lblreturncode.text = "The Connection State is: " & cn.state & " - Connection Failed" End If End Sub </script> </head> <body> <asp:label id="lblreturncode" Runat=server /> </body> </html> SQL Managed Provider ADO.NET Managed Provider+OLEDB ADO.NET Managed Provider+ODBC PIII Access 2000 MS SQL Server 2000 ( ) ADO.NET Managed Provider+ODBC ADO.NET Managed Provider+OLEDB SQL Managed Provider ADO.NET Managed Provider+ODB C ADO.NET Managed Provider+OLE DB SQL Managed Provider SQL Managed Provider ADO.NET Managed ProviderODBC OLEDB OLEDB ODBC

15 ( aspx) Page EnableSessionState="False" %> Import Namespace="System.Data" %> Import Namespace="System.Data.ADO" %> Import Namespace="System.Data.SQL" %> <script language="vb" runat="server"> Sub Refresh(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim d1,d2 As DateTime Dim strconn if Page.IsValid then d1=now() Dim ichoice As Integer=CInt(Choices.SelectedItem.Value) select case ichoice case 1 strconn="dsn=pubs;" ADOBindData(strConn) case 2 strconn="provider=sqloledb.1;data Source=(local);uid=sa;pwd=;Initial Catalog=pubs" ADOBindData(strConn) case 3 strconn="server=localhost;uid=sa;pwd=;database=pubs" '"server=localhost;uid=sa;pwd=;database=northwind;" SQLBindData(strConn) Case Else end select d2=now() result.text = " (Ticks) "&d2.ticks-d1.ticks end if End Sub Sub ADOBindData(strConn) '... ' ADOConnection

16 Dim objconn as ADOConnection = New ADOConnection(strConn) objconn.open() ' ' SQL Dim strsql as String = "SELECT * FROM authors" ' ADODatasetCommand Dataset Dim objdscommand as ADODatasetCommand Dim objdataset as Dataset = New Dataset objdscommand = New ADODatasetCommand(strSQL, objconn) ' Dataset ' "Author Information" objdscommand.filldataset(objdataset, "Author Information") objconn.close() ' objconn = Nothing ' Authors.DataSource = _ objdataset.tables("author Information").DefaultView Authors.DataBind() End Sub Sub SQLBindData(strConn) '... ' ADOConnection Dim objconn as SQLConnection = New SQLConnection(strConn) objconn.open() ' ' SQL Dim strsql as String = "SELECT * FROM authors" ' SQLDatasetCommand Dataset Dim objdscommand as SQLDatasetCommand Dim objdataset as Dataset = New Dataset objdscommand = New SQLDatasetCommand(strSQL, objconn) ' Dataset ' "Author Information" objdscommand.filldataset(objdataset, "Author Information")

17 objconn.close() ' objconn = Nothing ' Authors.DataSource = _ objdataset.tables("author Information").DefaultView Authors.DataBind() End Sub </script> <HTML> <BODY> <H2> </H2> <Form Action=" aspx" Method="Post" RunAt="Server"> <asp:radiobuttonlist ID="choices" RunAt="Server"> <asp:listitem selected Text="ADO.NET Managed Provider+ODBC" Value=1/><br> <asp:listitem Text="ADO.NET Managed Provider+OLEDB" Value=2/><br> <asp:listitem Text="SQL Managed Provider" Value=3/> </asp:radiobuttonlist> <br> <asp:linkbutton runat="server" OnClick="Refresh" Text=""/> <br> <H2> </H2> <asp:label id="result" RunAt="Server" Text="No result"/> <br> <H2> </H2> <asp:datagrid id="authors" runat="server"/> </Form> </BODY> </HTML> DataSets DataSets DataSets DataSets DataSets DataSets DataSets DataSets

18 DataSets DataSets 1. SQLDataSetCommand (SQL ) ADODataSetCommand (ADO ) DataSet Ado Dim MyDsComm As New ADODataSetCommand Dim MyComm As ADOCommand Dim MyConn As ADOConnection MyConn = New ADOConnection _ ("Provider=SQLOLEDB.1;Initial Catalog=Northwind;" & _ "Data Source=(local);User ID=sa;") MyComm = New ADOCommand("SELECT * FROM Customers", MyConn) MyDsComm.SelectCommand = MyComm SQL Dim MyConn as SQLConnection Dim MyComm as SQLDataSetCommand Dim MyDs as New DataSet MyConn=New SQLConnection( server=localhost;uid=sa;pwd=;database=pubs ) MyComm=New SQLDataSetCommand( Select * from authoers,myconn) MyComm.FillDataSet(Myds, authers ) 2 DataSet DataTable DataRow 3 GetChanges DataSet DataSet Dim changeddataset As DataSet changeddataset = ds.getchanges(datarowstate.modified) 4 DataSet HasErrors DataSet

19 5 DataSet DataTable HasErrors GetErrors DataRow 6 DataRow RowError 7 8 DataSet Merge DataSet DataSet ds.merge(changeddataset) 9 DataSetCommand update DataSet MyDataSetCommand.Update(ds) 10 DataSet AcceptChanges RejectChanges, Ds.AcceptChanges DataSet 1 DataSet() DataSet() Dim ds1 as New DataSet Dim ds2 as New DataSet( MyDataSet ) 2 DataTable DataSet DataSet Tables ds.tables.add(new DataTable()) Columns ds.tables( ).Columns.Add( ) ds (Order) ORNO ORNM ds.tables.add(new DataTable( Order )) ds.tables( Order ).Columns.Add( CUNM,GetType(String))

20 ds.tables( Order ).Columns.Add( ORNO,GetType(String)) ds.tables( Order ).Columns.Add( ORNM,GetType(int32)) ds.tables( Order ).PrimaryKey= New DataColumn(ds.Tables( Order ).Columns( ORNO ) PrimaryKey 3 DataSet DataTable asp.net DataRelation DataRelation (Order) CUNO Asp.net Dim ds as DataSet ds.relations.add( CustomerOrder,ds.Tables( Customer ).Columns( CUNO ), ds.tables( Order ).Columns( CUNO )) 4 DataRelaiton DataSet dim orderrows() as DataRow orderrows=ds.tables( Customer ).ChildRelations( CustomerOrder ).GetChildRows( ds.tables( Customer ).Rows(0)) 5 asp.net ForeignKeyConstr UniqueConstraint ForeignKeyConstraint ForeignKeyConstraint Cascade

21 SetNull Null SetDefault None Default ForeignKeyConstraint Cascade ForeigKeyConstraint DeleteRule UpDateRule dim fk as New ForeignKeyConstraint(ds.Tables( Customer ).Columns( CUNO ), ds.tables( Order.Columns( CUNO )) Customer Order CUNO fk.deleterule=cascade fk.updaterule=setdefault Cascade SetDefault ds.tables( Customer ).Constraints.Add(fk) Customer UniqueConstraint dim uc as UniqueConstraint uc=new UniqueConstraint(ds.Tables( Customer ).Columns( CUNO )) Customer CUNO ds.tables( Customer ).Constraints.Add(uc) Customer 6 DataSet DataSet asp.net DataSet PropertyChange MergeFailed DataSet RemoveTable RemoveRelation Adding the event handler to the event

22 ds.addonpropertychange(new System.ComponentModel.PropertyChangeEventHandler _ (AddressOf me.datasetpropertychange)) DataSet PropertyChange DataSetPropertyChange ds.addonmergefailed(new System.Data.MergeFailedEventHandler _ (AddressOf me.datasetmergefailed)) DataSet MergeFailed DataSetMergeFailed PropertyChange Private Sub DataSetPropertyChange _ (ByVal sender As Object, ByVal e As System.PropertyChangeEventArgs) End Sub MergeFailed Private Sub DataSetMergeFailed _ (ByVal sender As Object, ByVal e As System.Data.MergeFaileedEventArgs) End Sub DataTable DataTable DataSet DataSet 1 DataTable DataTable DataSets dim MyTable as DataTable MyTable = New DataTable("Test") MyTable.CaseSensitive = False MyTable.MinimumCapacity = 100 CaseSensitive CaseSensitive MinimumCapacity TableName 1 dim MyTable as DataTable MyTable=New DataTable( test )

23 2 dim MyTable as New DataTable MyTable.TableName= test 2 DataTable Columns Columns Add.net GetType.net Customer CUNM CUNO IDNO Dim MyTable as DataTable Dim MyColumn as DataColumn MyTable = new DataTable("Customer") MyColumn = MyTable.Columns.Add("CUNM",GetType("String") ) MyColumn = MyTable.Columns.Add("CUNO",GetType("String") ) MyColumn = MyTable.Columns.Add("IDNO",GetType("int32") ) 3 asp.net DataType Expression 0.2 total rate tax Dim tax As DataColumn = New DataColumn tax.datatype = GetType("Currency") tax.expression = "total *rate*0.20" MyTable.Columns.Add( tax,gettype( Currency ), total*rate*0.20)

24 4 asp.net DataColumn AutoIncrement AutoIncrementSeed AutoIncrementStep AutoIncrement AutoIncrementSeed AutoIncrementStep dim MyTable as New DataTable dim MyColumn as DataColumn MyColumn=MyTable.Columns.Add( Sqno,GetType( int32 )) MyColumn.AutoIncrement=True MyColumn.AutoIncrementSeed=0 MyColumn.AutoIncrementStep=2 5 DataColumn AllowNull Unique DataColumn1.AllowNull=False DataColumn1.Unique=True DataTable PrimaryKey dim MyColumn as DataColumn dim MyTable as DataTable MyColumn=MyTable.Columns( CUNO ) MyColumn.AllowNull=False MyColumn.Unique=True MyTable.PrimaryKey=MyColumn dim MyColumn as DataColumn() MyColumn(0)=MyTable.Columns( col1 ) MyColumn(1)=MyTable.Columns( col2 )

25 MyTable.PrimaryKey=MyColumn DataRow DataRow Columns DataRow DataTable DataRows MyTable Sqno Name Sqno Name MyName + n MyTable Dim i as integer Dim n as integer Dim MyRow as DataRow For i = 0 to n MyRow = MyTable.NewRow() MyRow("Sqno") = I sqno MyRow("Name") = "MyName" & i.tostring() name MyTable.Rows.Add(MyRow) Next DataTable Rows Remove Delete MyTable MyTable.Rows.Remove(3) MyTable.Rows(3).Delete Delete Remove Remove DataRow Rows Delete DataRow Rows DataSet AcceptChanges RejectChanges Delete DataRow

26 DataTable Row, Original Current Preposed Original Original Row Preposed original Current Original Current Preposed, worktable Dim CurrRows() As DataRow = worktable.select(nothing, Nothing, _ System.Data.DataViewRowState.CurrentRows) worktable DataRows CurrRows Dim list As String = System.String.Empty list Dim RowNo As Integer Dim ColNo As Integer For RowNo = 0 to CurrRows.Count 1 For ColNo = 0 To worktable.columns.count 1 list = "" list &= worktable.columns(colno).columnname & " = " & _ CurrRows(RowNo)(ColNo).ToString Console.WriteLine(list) Next Next If CurrRows.Count < 1 Then Console.WriteLine("No CurrentRows Found") Rows DataTable Select Rows Rows.count columns.count DataReader

27 Read Recordset Dataset ADO.NET DataReader namespace="system.data.sql"%> <script language="vb" runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim sqltext as String = "select * from authors" Dim cnstring as string = "server=localhost;uid=sa;pwd=;database=pubs;" Dim dbread AS SQLDataReader Dim sqlcmd AS SQLCommand sqlcmd = New SQLCommand(sqlText,cnString) sqlcmd.activeconnection.open() sqlcmd.execute(dbread) while dbread.read() response.write("<br>" & dbread.item("au_lname")) End while End Sub </script> Recordset MoveNext Recordset EOF Recordset MoveNext ADO.NET DataReder Read Iterator SQLConnection SQLCommand sqlcmd.activeconnection.open()

28 Read DataReader namespace="system.data.sql"%> <SCRIPT LANGUAGE="vb" RUNAT="server"> Sub Page_Load(myList AS Object,E as EventArgs) If Not Page.IsPostBack() Dim dbread AS SQLDataReader Dim dbcomm AS SQLCommand Dim strconn AS String Dim SQL AS String strconn = "server=sql.database.com;uid=fooman;password=foopwd;" SQL = "Select * from Color ORDER BY Color" dbcomm = New SQLCommand(SQL,strConn) dbcomm.activeconnection.open() dbcomm.execute(dbread) While dbread.read() ShirtColorOptions.items.add(New ListItem(dbRead.Item("Color"))) End While SQL = "Select * from Size ORDER BY Size"

29 dbcomm = New SQLCommand(SQL,strConn) dbcomm.activeconnection.open() dbcomm.execute(dbread) While dbread.read() ShirtSizeOptions.items.add(New ListItem(dbRead.Item("Size"))) End While End IF End Sub </SCRIPT> <FORM RUNAT="server" method="get"> <asp:dropdownlist id="shirtcoloroptions" runat="server" DataTextField = "URL"/> <asp:dropdownlist id="shirtsizeoptions" runat="server" DataTextField = "Size"/> </FORM> DataReader DataGrid NET Framework Beta2 <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <% Dim myconn As SQLConnection = new SQLConnection("server=localhost;uid=sa;pwd=;database=NorthWind;") Dim mycommand As SQLCommand = new SQLCommand("select * from cusotmers",myconn) myconn.open() cusotmers.datasource = mycommand.execute() cusotmers.databind() myconn.close() %> <HTML> <BODY> <asp:datagrid id="cusotmers" runat="server"/>

30 </BODY> </HTML> DataReader <SCRIPT LANGUAGE="vb" RUNAT="server"> Sub showdb() namespace="system.data.sql"%> Dim dbread AS SQLDataReader Dim dbcomm AS SQLCommand Dim strconn AS String Dim strsql AS String strconn= "server=my.sql.database;uid=fooname;password=foofoo;" strsql = "INSERT INTO mydatabase (dbvalue1) VALUES('the thing')" dbcomm = New SQLCommand(strSQL, strconn) dbcomm.activeconnection.open() dbcomm.execute(dbread) End Sub </SCRIPT> ADO.NET ADO.NET 1 ODBC 2 OLEDB 3 SQL Server DataSet DataReader

31 ADO.NET SQLCommand SQL Insert Into ( 1 2) 1 Values ( 2) SQLCommand SQL SQL SQLCommand CommandText ExecuteNonQuery Dim strconn As String Dim strcomm As String Dim oconn As SQLConnection Dim ocomm As SQLCommand strconn = "server=localhost;uid=sa;pwd=;database=northwind" strcomm = "INSERT INTO CUSTOMERS (CustomerId, CompanyName, Contactname, ContactTitle, Address) Values ('DarkMan','Sino-ASP.COM', 'Mr. Li', 'CTO','')" oconn = new SQLConnection(strConn) ocomm = new SQLCommand(strComm, oconn) Try oconn.open() ocomm.executenonquery() Catch myexception as Exception // Finally oconn.close() End Try

32 SQLDataSetCommand SQLDataSetCommand Dim strconn,strcomm As String // strconn="server=localhost;uid=sa;pwd=;database=northwind" // strcomm="select * from region" Dim oconn As New SQLConnection(strConn) Dim odscomm As New SQLDataSetCommand(strComm,oConn) Dim oparam As SQLParameter odscomm.insertcommand = new SQLCommand("Insert into Region (RegionID, RegionDescription) VALUES oconn) oparam = odscomm.insertcommand.parameters.add(new SQLParameter("@RegionID", SQLDataType.Int)) oparam.sourceversion = DataRowVersion.Current oparam.sourcecolumn = "RegionID" oparam = odscomm.insertcommand.parameters.add(new SQLParameter("@RegionDescription", SQLDataType.NChar, 50)) oparam.sourceversion = DataRowVersion.Current oparam.sourcecolumn = "RegionDescription" Dim ods as New DataSet RegionID odscomm.missingschemaaction = MissingSchemaAction.AddWithKey odscomm.filldataset(ods, "Region") Dim index Dim orow as DataRow for index=0 to 20 orow = ods.tables("region").newrow() orow (0) = CStr(index) orow (1) = ""+CStr(index) ods.tables("region").rows.add(newrow)

33 next Try odscomm.update(ods,"region") Catch oexception As Exception // Finally oconn.close End Try sql UPDATE FORUM SET Notes= where [ID]=1 FORUM ID=1 Notes.NET? aspx code\database\update.aspx Import Namespace="System.Data" %> Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> ' Dim UConn As SQLConnection ' Sub Page_Load(Sender As Object, E As EventArgs) ' UConn = New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") If Not (IsPostBack)

34 BindGrid() End If End Sub ' Edit Sub UDG_Edit(Sender As Object, E As DataGridCommandEventArgs) UDG.EditItemIndex = CInt(E.Item.ItemIndex) BindGrid() End Sub ' Cancle Sub UDG_Cancel(Sender As Object, E As DataGridCommandEventArgs) UDG.EditItemIndex = -1 BindGrid() End Sub ' UpDate Sub UDG_Update(Sender As Object, E As DataGridCommandEventArgs) ' Dim DS As DataSet ' Dim UComm As SQLCommand ' sql Dim UpdateCmd As String = "UPDATE FORUM SET [ID]=@fid,[Name]=@fname,Notes=@Notes,FatherID=@FatherID,status=@status [ID]=@fid" where ' UComm = New SQLCommand(UpdateCmd, UConn) 4)) ' UComm.Parameters.Add(New SQLParameter("@fid", SQLDataType.VarChar, 4)) UComm.Parameters.Add(New SQLParameter("@fname", SQLDataType.VarChar, 50)) UComm.Parameters.Add(New SQLParameter("@Notes", SQLDataType.VarChar, 500)) UComm.Parameters.Add(New SQLParameter("@FatherID", SQLDataType.VarChar, UComm.Parameters.Add(New SQLParameter("@status", SQLDataType.VarChar, 1))

35 ' Dim Cols As String() = {"@fid","@fname","@notes","@fatherid","@status"} ' UComm.ActiveConnection.Open() Try ' UComm.ExecuteNonQuery() Message.InnerHtml = "" ' Edit UDG.EditItemIndex = -1 ' Catch Exp As SQLException If Exp.Number = 2627 Message.InnerHtml = "" Else Message.InnerHtml = "" End If Message.Style("color") = "red" End Try ' UComm.ActiveConnection.Close() ' BindGrid() BindGrid() End Sub ' BindGrid() Sub BindGrid() Dim DS As DataSet Dim UComm As SQLDataSetCommand ' forum UComm = new SQLDataSetCommand("select * from forum", UConn) ' DS = new DataSet()

36 UComm.FillDataSet(DS, "forum") ' UDG.DataSource=DS.Tables("forum").DefaultView UDG.DataBind() End Sub </script> <title> Update! </title> <body style="font: 10pt verdana"> <BR> <CENTER> <form runat="server"> <h3><font face="verdana">.net-></font></h3> <span id="message" MaintainState="false" style="font: arial 11pt;" runat="server"/><p> <!-- --> <ASP:DataGrid id="udg" runat="server" Width="800" BackColor="#ffffff" BorderColor="black" ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#ffffff" OnEditCommand="UDG_Edit" OnCancelCommand="UDG_Cancel" OnUpdateCommand="UDG_Update" > <property name="columns"> <asp:editcommandcolumn EditText="" CancelText=" " UpdateText="" ItemStyle-Wrap="false"/> </property> </ASP:DataGrid>

37 </form> </CENTER> </body> </html>

38 3.4.3 NetBBS forum delete from forum where [id]=11 id=11 aspx sql ID forum ID ' ID SComm.Parameters.Add(New SQLDataType.VarChar, 4)) = SDG DataKeys(CInt(E.Item.ItemIndex)) ID ID sql Try SComm.ExecuteNonQuery()

39 Message.InnerHtml = " " & DeleteCmd Catch Exp As SQLException Message.InnerHtml = " " Message.Style("color") = "red" End Try SComm.ExecuteNonQuery() code\database\del.aspx <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> ' Dim SConn As SQLConnection ' Sub Page_Load(Src As Object, E As EventArgs) ' SConn = New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") If Not (IsPostBack) BindGrid() End If End Sub ' Sub SDel(Sender As Object, E As DataGridCommandEventArgs) ' Dim SComm As SQLCommand Dim DeleteCmd As String = "DELETE from FORUM where [ID] SComm = New SQLCommand(DeleteCmd, SConn) ' ID SComm.Parameters.Add(New SQLParameter("@fid", SQLDataType.VarChar, 4)) SComm.Parameters("@fid").Value = SDG.DataKeys(CInt(E.Item.ItemIndex))

40 ' SComm.ActiveConnection.Open() Try SComm.ExecuteNonQuery() Message.InnerHtml = " " & DeleteCmd Catch Exp As SQLException Message.InnerHtml = " " Message.Style("color") = "red" End Try ' SComm.ActiveConnection.Close() BindGrid() End Sub ': Sub BindGrid() ' Dim DS As DataSet Dim SComm As SQLDataSetCommand SComm = New SQLDataSetCommand("select * from FORUM", SConn) ' DS = new DataSet() SComm.FillDataSet(DS, "FORUM") ' SDG.DataSource=DS.Tables("FORUM").DefaultView SDG.DataBind() End Sub </script> <title> Delete!! <title> <body style="font: 10pt verdana"> <br><br><br> <center> <form runat="server">

41 <h3><font face="verdana">.net-> </font></h3><br><br> <span id="message" MaintainState="false" style="font: arial 11pt;" runat="server"/><p> <ASP:DataGrid id="sdg" runat="server" Width="800" BackColor="#ffffff" BorderColor="black" ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#ffffff" DataKeyField="ID" OnDeleteCommand="SDel" > <property name="columns"> <asp:buttoncolumn Text="" CommandName="Delete"/> </property> </ASP:DataGrid> </form> </center> </body> </html>

42 ID=12 sql

43 3.4.4 SQL Server SQL aspx aspx SQL SQL SQL SQL SQL SQL CREATE PROCEDURE CREATE PROCEDURE CREATE PROCEDURE pro_book AS SELECT * FROM forum pro_book SQL SQL AS SQL forum EXECUTE pro_book

44 EXECUTE pro_book SQL forum EXECUTE ISQL/W pro_book NetBBS pro_book NetBBS2 pro_book NetBBS2 pro_book EXECUTE NetBBS.. pro_book sp_helptext SQL sp_helptext pro_book text CREATE PROCEDURE pro_book AS SELECT * FROM forum sp_helptext Master sp_helptext sp_helptext sp_helptext SQL DROP PROCEDURE pro_book DROP PROCEDURE pro_book sp_help sp_help sp_help sp_help SQL Enterprise Manager

45 .NET NetBBS create procedure pro_book as select * from forum pro_book forum StorePro.aspx <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) ' Dim DS As DataSet ' Dim SConn As SQLConnection ' Dim SComm As SQLDataSetCommand ' Sconn=New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") SComm = New SQLDataSetCommand("pro_book", SConn) ' SComm.SelectCommand.CommandType = CommandType.StoredProcedure ' DS = new DataSet() SComm.FillDataSet(DS, "forum") SDG.DataSource=DS.Tables("forum").DefaultView SDG.DataBind() End Sub

46 </script> <body> <center> <h3><font face="verdana"> <ASP:DataGrid id="sdg" runat="server" Width="360" BackColor="#ccccff" BorderColor="black" ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" MaintainState="false" /> </center> </body> </html> SComm = New SQLDataSetCommand("pro_book", SConn) ' SComm.SelectCommand.CommandType = CommandType.StoredProcedure pro_book NetBBS aspx aspx

47 create procedure pro_outbook as varchar(1000) out ) [name] from forum ) select forum name

48 EXECUTE OUT VARCHAR(1000) varchar(20) EXECUTE pro_outbook OUT NET NetBBS create procedure varchar(4) as select [id] as 'ID',[name] as ' ',[notes] as ' ',[fatherid] as ' ID',status as '' from forum where pro_inputbook id name [] SQL Server aspx code\database\storeprowithinpara.aspx Import Namespace="System.Data" %> Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> ' Sub Page_Load(Src As Object, E As EventArgs) ' Dim DS As DataSet

49 ' Dim IConn As SQLConnection ' Dim IComm As SQLDataSetCommand ' IConn=New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") ' IComm = New SQLDataSetCommand("pro_inputbook", IConn) ' IComm.SelectCommand.CommandType = CommandType.StoredProcedure ' IComm.SelectCommand.Parameters.Add(New SQLParameter("@fid", SQLDataType.NVarChar, 15)) ' IComm.SelectCommand.Parameters("@fid").Value = Request.QueryString("forumid") ' DS = new DataSet() IComm.FillDataSet(DS, "forum") ' IDG.DataSource=DS.Tables("forum").DefaultView IDG.DataBind() End Sub </script> <body style="font: 10pt verdana"> <br><br><br> <center> <br><br><br> <ASP:DataGrid id="idg" runat="server" Width="650" BackColor="#ccccff" BorderColor="black"

50 ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" MaintainState="false" /> </center> </body> </html> 1 ' IComm.SelectCommand.Parameters("@fid").Value = Request.QueryString("forumid") (forumid=1) ' IComm.SelectCommand.Parameters.Add(New SQLParameter("@fid", SQLDataType.NVarChar, 15)) pro_inputbook 1 ID=1

51 create procedure int output as (select count(*) from topic) code\database\storeprowithoutpara.aspx IComm = New SQLDataSetCommand("pro_outpara", IConn) IComm.SelectCommand.CommandType = CommandType.StoredProcedure IComm.SelectCommand.Parameters.Add(New SQLParameter("@title", SQLDataType.Int)) IComm.SelectCommand.Parameters("@title").Direction = ParameterDirection.Output System.Math.Ceil(IComm.SelectCommand.Parameters("@count").Value) <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) ' Dim IConn As SQLConnection

52 ' Dim IComm As SQLDataSetCommand ' Dim DS As DataSet IConn = New SQLConnection("server=localhost;uid=sa;pwd=;database=NETBBS") IComm = New SQLDataSetCommand("pro_outpara", IConn) ' IComm.SelectCommand.CommandType = CommandType.StoredProcedure ' IComm.SelectCommand.Parameters.Add(New SQLParameter("@count", SQLDataType.Int)) IComm.SelectCommand.Parameters("@count").Direction = ParameterDirection.Output ' DS = new DataSet() IComm.FillDataSet(DS, "topic") ' 'IDG.DataSource=DS.Tables("topic").DefaultView 'IDG.DataBind() If Not Page.IsPostBack Then TotalPages.Text = System.Math.Ceil(IComm.SelectCommand.Parameters("@count").Value ) End If End Sub </script> <body bgcolor="#ccccff" style="font: 10pt verdana"> <br><br><br> <center>.net-> <br><br><br> <asp:label id="totalpages" runat="server" />

53 </center> </body> </html> Grid BBS ID ID ID ID ID Request.QueryString("id")

54 ID sql aspx code\database\rel01.aspx Import Namespace="System.Data" %> Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> ' Sub Page_Load(Src As Object, E As EventArgs) ' Dim DS As DataSet ' Dim rconn As SQLConnection ' Dim rcomm As SQLDataSetCommand ' rconn = New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") rcomm = New SQLDataSetCommand("select UserID,ForumID AS ' ID', title as ' ',contents as '',nview ',nreply as ' ' as ' from topic", rconn) ' DS = new DataSet() rcomm.filldataset(ds, "topic") ' rdg.datasource=ds.tables("topic").defaultview rdg.databind() End Sub </script> <title>

55 Relation!!! </title> <body style="font: 10pt verdana"> <center> <br> <form runat="server"> <h3><font face="verdana">.net-> </font></h3> <span id="message" MaintainState="false" style="font: arial 11pt;" runat="server"/><p> <ASP:DataGrid id="rdg" runat="server" Width="800" BackColor="#ffffff" BorderColor="black" ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#aaaadd" DataField="UserID" > <property name="columns"> <asp:hyperlinkcolumn DataNavigateUrlField="UserID" DataNavigateUrlFormatString="Rel02.aspx?id={0}" Text=" " /> </property> </ASP:DataGrid> </form> </center> </body> </html> code\database\rel02.aspx sql sql

56 Import Namespace="System.Data" %> Import Namespace="System.Data.SQL" %> <html> <script language="vb" runat="server"> ' Sub Page_Load(Src As Object, E As EventArgs) ' Dim DS As DataSet ' Dim rconn As SQLConnection ' Dim rcomm As SQLDataSetCommand Dim SelectCmd As String = "select [ID],education, area, salary from [user] where [ID]=@uid" ' rconn = New SQLConnection("server=localhost;uid=NetBBS;pwd=;database=NETBBS") rcomm = New SQLDataSetCommand(SelectCmd, rconn) ' ID rcomm.selectcommand.parameters.add(new SQLParameter("@uid", SQLDataType.VarChar, 11)) rcomm.selectcommand.parameters("@uid").value = Request.QueryString("id") ' DS = new DataSet() rcomm.filldataset(ds, "user") ' rdg.datasource=ds.tables("user").defaultview

57 rdg.databind() End Sub </script> <title> Relation!!! </title> <center> <body style="font: 10pt verdana"> <form runat="server"> <h3><font face="verdana">.net-> </font></h3> <h4><font face="verdana"> <%=Request.QueryString("id")%> </font></h4> <ASP:DataGrid id="rdg" runat="server" Width="800" BackColor="#ffffff" BorderColor="black" ShowFooter="false" CellPadding=3 CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#ffffff" /> </form> </center> </body> </html>

58 3.4.6 sql area select * from area update area(address) values( ) select sql server begin {transaction tran}[transaction_name] sql server

59 3.4.7 ADO.NET Dataset Dataset Recordset D Recordset DataReader Dataset Dataset Table Dataset Table Dataset 1 SQLConnection con =new SQLConnection("server=localhost;uid=sa;pwd=;database=pubs"); 2 DataSetCommand SQL SQLDataSetCommand cmd =new SQLDataSetCommand("SELECT * FROM Authors", con); 3 Dataset DataSet ds = new DataSet();

60 4 DataSetCommand FillData Dataset FillData FillData FillData int irowcount = cmd.filldataset(ds, Authors ); 5 FillData Dataset for(int i=0; i< irowcount; i++){ DataRow dr = ds.tables[0].rows[i]; Console.WriteLine(dr["au_lname"]); } DataSet ASP.NET Repeater DataList and DataGrid HTML Repeater DataList DataGrid System.Web.UI.WebControls (Namespace) HTML (list-bound controls) Web HTML

61 HTML Web DataSource Repeater DataList DataGrid System.Collections.Icollection DataSource DataSource ASP.NET DataSource System.Data.DataView ArrayList HashTable ADO Recordset ICollection DataSource DataSource 1 SQL Server pubs Repeater DataList DataGrid (DataView) (DataSource) DropDownList 3 1 <!-- code\database\formdatasource.aspx --> <!-- FormDataSource.aspx --> <%@ import namespace="system.data" %> <%@ import namespace="system.data.sql" %> <!--DataSet system.data, system.data.sql--> <html> <script language="vb" runat=server>

62 sub Page_Load(o as object,e as eventargs) dim MyConnection as SQLConnection dim MyStr as String dim MyDataSetCommand as SQLDataSetCommand dim MyDataSet as New DataSet If Not IsPostBack MyConnection=New SQLConnection("server=localhost;uid=sa;pwd=;database=pubs") ' MyStr="Select au_lname,au_fname from authors" ' author MyDataSetCommand=New SQLDataSetCommand(Mystr,MyConnection) MyDataSetCommand.FillDataSet(MyDataSet,"Authors") ' DataSet, Authors Session("MyDs")=MyDataSet ' DataSet MyDs Else MyDataSet=Session("MyDs") ' DataSet if MyDataSet is Nothing Response.Write("") else ', Select Case DpDnLst.SelectedItem.text case "Repeater" Response.write _ ("<center> <I>Repeater</I> </center>") db1.datasource=mydataset.tables("authors").defaultview db1.databind panel1.visible=true panel2.visible=false panel3.visible=false case "DataList" Response.write _ ("<center> <B>DataList</B> </center>") db2.datasource=mydataset.tables("authors").defaultview db2.databind

63 panel1.visible=false panel2.visible=true panel3.visible=false case "DataGrid" Response.write _ ("<center> <U>DataGrid</U> </center>") db3.datasource=mydataset.tables("authors").defaultview db3.databind panel1.visible=false panel2.visible=false panel3.visible=true case else End Select end if End If end sub </script> <head> <title> </title> </head> <body bgcolor=#ffffff> <center> <h2>datasource </h2> <hr> <form runat=server> <asp:dropdownlist id="dpdnlst" runat=server> <asp:listitem>repeater</asp:listitem> <asp:listitem>datalist</asp:listitem> <asp:listitem>datagrid</asp:listitem> </asp:dropdownlist> <asp:button text=" " runat=server/> <hr>

64 <!-- <!-- : Repeater --> <asp:panel id="panel1" visible=false runat=server> <asp:repeater id="db1" runat=server> <!-- Repeater --> <template name="headertemplate"> <table> <tr> <td> </td> <td> </td> </tr> </template> <!-- Repeater --> <template name="itemtemplate"> <tr> <td> <%# databinder.eval(container.dataitem,"au_lname") %> </td> <td> <%# databinder.eval(container.dataitem,"au_fname") %> </td> </tr> </template> <!-- Repeator --> <template name="footertemplate"> </table> </template> </asp:repeater> </asp:panel> <!-- DataList --> <asp:panel id="panel2" visible=false runat=server> <asp:datalist id="db2" runat=server> <!-- datalist > <template name="itemtemplate"> <%# databinder.eval(container.dataitem,"au_lname") %>

65 ---- <%# databinder.eval(container.dataitem,"au_fname") %> <br> </template> </asp:datalist> </asp:panel> <!-- DataGrid --> <asp:panel id="panel3" visible=false runat=server> <asp:datagrid id="db3" runat=server> </asp:datagrid> </asp:panel> </form> </center> </body> </html> 2 3 Repeater

66 4 DataList 5 DataGrid

67 2 ArrayList Repeater DataList DataGrid DataGrid ArrayList <!-- FormDataSource01.aspx --> <html> <script language="vb" runat=server> ' Public Class PName private first_name as String private last_name as String Public Property Fname as String Get return first_name End Get Set first_name=value End Set

68 End Property Public Property Lname as String Get return last_name End Get Set last_name=value End Set End Property ' Public Sub New(f as String,l as String) MyBase.New first_name=f last_name=l End Sub End Class Sub Page_Load(o as object,e as eventargs) If Not IsPostBack ' datagrid dim Values as New ArrayList Values.add(New PName("Bennet","Abraham")) Values.add(New PName("Blotchet-Halls","Reginald")) Values.add(New PName("Carson","Cheryl")) Values.add(New PName("DeFrance","Michel")) Values.add(New PName("del Castillo","Innes")) dtgrd.datasource=values dtgrd.databind End If End Sub </script> <head> <title> </title> </head>

69 <body bgcolor=#ccccff> <center> <h2> (ArrayList)</h2> <hr> <form runat=server> <asp:datagrid id="dtgrd" runat=server/> </form> </center> </body> </html> 2 3 HashTable ArrayList MyHashTable.add(index,object) index hash object Values MyDataGrid.DataSource=MyHashTable.Values 1 HashTable <!-- FormDataSoure02.aspx --> <html>

70 <script language="vb" runat=server> ' Public Class PName private first_name as String private last_name as String Public Property Fname as String Get return first_name End Get Set first_name=value End Set End Property Public Property Lname as String Get return last_name End Get Set last_name=value End Set End Property ' Public Sub New(f as String,l as String) MyBase.New first_name=f last_name=l End Sub End Class Sub Page_Load(o as object,e as eventargs) dim ht as New HashTable if Not IsPostBack 'hash Table Add : ht.add("1",new PName("Bennet","Abraham")) ht.add("2",new PName("Blotchet-Halls","Reginald")) ht.add("3",new PName("Carson","Cheryl"))

71 ht.add("4",new PName("DeFrance","Michel")) ht.add("5",new PName("del Castillo","Innes")) DtGrd.datasource=ht.values DtGrd.databind ' hashtable End if End Sub </script> <head> <title> </title> </head> <body bgcolor=#ccccff> <center> <h2>(hashtable)</h2> <hr> <form runat=server> <asp:datagrid id="dtgrd" runat=server/> </form> </center> </body> </html> 2 HashTable

72 4 Icolletion LoadData Icolletion LoadData LoadData 1 Icolletion <!-- FormDataSource03.aspx --> <%@ Import NameSpace="System.Data" %> <html> <script language="vb" runat=server> Function LoadData() As ICollection Dim dt As DataTable Dim dr As DataRow ' dt = New DataTable dt.columns.add(new DataColumn(" ", GetType(String))) dt.columns.add(new DataColumn(" ", GetType(String)))

73 ' dr = dt.newrow() dr(0) = "Bennet" dr(1) = "Abraham" dt.rows.add(dr) dr = dt.newrow() dr(0) = "Blotchet-Halls" dr(1) = "Reginald" dt.rows.add(dr) dr = dt.newrow() dr(0) = "Carson" dr(1) = "Cheryl" dt.rows.add(dr) dr = dt.newrow() dr(0) = "DeFrance" dr(1) = "Michel" dt.rows.add(dr) dr = dt.newrow() dr(0) = "del Castillo" dr(1) = "Innes" dt.rows.add(dr) ' LoadData = New DataView(dt) End Function Sub Page_Load(o as object,e as eventargs) If Not IsPostBack DtGrd.DataSource=LoadData DtGrd.DataBind End If End Sub </script> <head> <title>

74 </title> </head> <body bgcolor=#ccccff> <center> <h2> (ICollection)</h2> <hr> <form runat=server> <asp:datagrid id="dtgrd" runat=server/> </form> </center> </body> </html> 2Icollection Items Items Item DataSource DataSource Item

75 Item AlternatingItem SelectedItem EditItem Item Items Item Item Item DataSource Item Header Footer Separator Item Repeater DataList Pager DataGrid Item ASP.NET DataBind DataSource DataBind DataSource Items DataSource Items DataSource DataBind DataSource WEB Items DataBind DataBind Items DataBind Style Style DataList DataGrid ForeColor BackColor Font BorderStyle Item ItemStyle AlternatingItemStyle HeaderStyle Item DataGrid HeaderStyle FooterStyle ItemStyle

76 Template Style template Item Template HTML Item Repeater DataList ItemTemplate AlternatingItemTemplate HeaderTemplate DataGrid Columns TemplateColumns TemplateColumns TemplateColumn Repeater DataList DataGrid Template Item Item Item Template Container Container DataItem Template Container.DataItem 1 ASP.Net DataBind() TextBox DataBind <!-- code\database\bonder\formdatabind01.aspx --> <!-- FormDataBind01.aspx --> <html>

77 <script language="vb" runat=server> Public PubVar as New String("") Public PubInt as Integer=2222 Sub Page_Load(o as object,e as eventargs) DataBind End Sub Public ReadOnly Property PubPropStr as String Get Return " " End Get End Property Public ReadOnly Property PubPropInt as Integer Get Return 1111 End Get End Property </script> <head> <title> </title> </head> <body bgcolor=#ffffff> <center> <h2> </h2> <asp:textbox id="tb" text="textbox " visible=false runat=server/> <hr> </center> <form runat=server> 1 (<%# PubVar %>)<br> 2 (<%# PubInt %>)<br> 1 (<%# PubPropStr %>)<br> 2 (<%# PubPropInt %>)<br> 1 (<%# tb.text %>) </form> </body>

78 </html> 2 asp.net Icollection ArrayList HashTable DataView DataReader dropdownlist 4 ArrayList DataView HashTable DataReader ArrayList ArrayList Add DropDownList Dim values as New ArrayList Values.add( ) DropDownList1.DataSource=values DropDownList1.DataBind HashTable ArryList Add HashTable ArryList Add(keyValue,Object) DataSource HashTable Values

79 Dim ht as HashTable Ht=New HashTable Ht.add(KeyValue, ) KeyValue DropDownList1.DataSource=ht.values DropDownList1.DataBind DataView DataView Table DataSource DataValueField DataValueField DropDownList SQL Dim dt as DataTable Dim dr as DataRow Dt=New DataTable Dt.Columns.add(New DataColumn(,GetTypeString( )) dr=dt.newrow dr(0)= dr(1)= dt.rows.add(dr) DropDownList1.DataSource=New DataView(dt) DropDownList1.DataValueField= DropDownList1.DataBind SQL <%@ Import NameSpace= System..Data %> <%@ Import NameSpace= System..Data.SQL %> dim MyConn as SQLConnectoin dim MyStr as String

80 dim MyDataSetCommand as SQLDataSetCommand dim MyDataSet as DataSet MyConn=new SQLConnection( server= ;uid= ;sa= ;dataserver= ) MyStr= Select * from MyDataSetCommand=New SQLDataSetCommand(MyStr,MyConn) MyDataSetCommand.FillDataSet(MyDataSet, ) DataSet DataSet DropDownList1.DataSource=MyDataSet.tables( ).Defaultaview DropDownList1.DataValueField= DropDownList1.DataBind DataReader DataView DataReader DataView DataReader dim MyConn as SQLConnection dim Mystr as String dim MyComm as SQLCommand dim MyReader as SQLDataReader MyConn=New SQLConnection("server= ;uid= ;pwd= ;database= ") ' MyStr="select * from " MyComm=New SQLCommand(Mystr,MyConn) MyConn.Open MyComm.Execute(MyReader) DropDownList1.Datasource=MyReader DropDownList1.DataValueField= DropDownList1.DataBind MyConn.Close SQL test city test city, city_name 4

81 , <!-- FormDataBind02.aspx --> import NameSpace="System.Data" %> import NameSpace="System.Data.SQL" %> <html> <script language="vb" runat=server> Sub Page_Load(o as object,e as eventargs) If Not IsPostBack ' Dim values as ArrayList values=new ArrayList() values.add("") values.add("") values.add("") values.add("") values.add("") values.add("") lstarray.datasource=values lstarray.databind ' ArrayList Dim dt as DataTable Dim dr as DataRow Dim i as Integer Dim ar as Array dt=new DataTable() dt.columns.add(new DataColumn("City",GetType(string))) ' city For i =0 to 5 dr=dt.newrow() dr(0)=values.item(i) dt.rows.add(dr) Next '

82 lstdataview.datasource=new DataView(dt) lstdataview.datavaluefield="city" lstdataview.databind ' DataView Dim ht as HashTable ht=new HashTable() ht.add("1","") ht.add("2","") ht.add("3","") ht.add("4","") ht.add("5","") ht.add("6","") lsthash.datasource=ht.values lsthash.databind ' HashTable dim MyConn as SQLConnection dim Mystr as String dim MyComm as SQLCommand dim MyReader as SQLDataReader MyConn=New SQLConnection("server=localhost;uid=sa;pwd=;database=test") ' Test MyStr="select city_name from city" ' city (city_name) MyComm=New SQLCommand(Mystr,MyConn) MyConn.Open MyComm.Execute(MyReader) lstdr.datasource=myreader lstdr.datavaluefield="city_name" lstdr.databind MyConn.Close End If End Sub </script> <head> <title> </title>

83 </head> <body bgcolor=#ccccff> <center> <h2> </h2> <hr> <form runat=server> <b>arraylist :</b> <asp:dropdownlist id="lstarray" runat=server /> <b>dataview :</b> <asp:dropdownlist id="lstdataview" runat=server /> <br> <p></p> <b>hashtable :</b> <asp:dropdownlist id="lsthash" runat=server /> <b>datareader :</b> <asp:dropdownlist id="lstdr" runat=server /> </form> </center> </body> </html>

84 3 asp.net <!-- FormDataBind03.aspx --> import namespace="system.data" %> import namespace="system.data.sql" %> <html> <script language="vb" runat=server> Public CLASS book private _name as string private _price as decimal public readonly property name as string Get return _name end Get end property public readonly property price as decimal Get return _price end Get end Property public sub New(n as string,p as decimal) MyBase.New _name=n _price=p end sub End Class Sub Page_Load(o as object,e as eventargs) if IsPostBack dim values as New ArrayList values.add(new book(" ",100.0)) values.add(new book("",90.0))

85 values.add(new book("",85.0)) values.add(new book(" ",60.0)) lbltxt.text="" dg1.datasource=values dg1.databind end if End Sub Public Function GetRealPrice(price as decimal) dim a as decimal a=cdbl(rate.selecteditem.value) GetRealPrice=price*a End Function </script> <head> <title> </title> </head> <body bgcolor=#ccccff> <center> <h2> </h2> <hr> <form runat=server> <asp:dropdownlist id="rate" runat=server> <asp:listitem>1.00</asp:listitem> <asp:listitem>0.95</asp:listitem> <asp:listitem>0.90</asp:listitem> <asp:listitem>0.80</asp:listitem> <asp:listitem>0.70</asp:listitem> <asp:listitem>0.60</asp:listitem> <asp:listitem>0.60</asp:listitem> </asp:dropdownlist> <asp:button text=" " runat=server/> <hr> <asp:label id="lbltxt" runat=server/> <br> <asp:datalist id="dg1" runat=server> <template name="headertemplate">

86 <table> <tr> <th> </th> <th> </th> </tr> </template> <template name="itemtemplate"> <tr> <td> <%# databinder.eval(container.dataitem,"name") %> </td> <td> $<%# GetRealPrice(databinder.eval(container.dataitem,"price")) %> </td> </tr> </template> <template name="footertemplate"> </table> </template> </asp:datalist> </form> </center> </body> </html>

87

88 4 databinder.eval

89 DataBinder.Eval, DataList DataGrid Reapter Container.DataItem <!-- FormDataBind04.aspx--> <html> <script language="vb" runat=server> Public CLASS book private _name as string private _price as decimal public readonly property name as string Get return _name end Get end property public readonly property price as decimal Get return _price end Get end Property public sub New(n as string,p as decimal) MyBase.New _name=n _price=p end sub End Class Sub Page_Load(o as object,e as eventargs) if Not IsPostBack dim ht as New ArrayList

90 end if End Sub </script> ht.add(new book(" ",100.0)) ht.add(new book("",90.0)) ht.add(new book("",85.0)) ht.add(new book(" ",60.0)) dl.datasource=ht dl.databind <head> <title> </title> </head> <body bgcolor=#ccccff> <center> <h2> DataBinder.Eval </h2> <hr> <form runat=server> <b> </b> <p></p> <asp:datalist id="dl" borderwith="1" girdlines="both" runat=server> <template name="itemtemplate"> <%# Databinder.eval(container.dataitem,"name") %> <%# Databinder.eval(container.dataitem,"price") %> </template> </asp:datalist> </form> </center> </body> </html>

91 Repeater Repeater DataSource Page language="c#" src="repeater1.cs" inherits="samples.repeater1page"%> <asp:repeater runat=server id="linkslistrepeater" DataSource='<%# SiteLinks %>'> <template name="headertemplate"> <ul type="1"> </template> <template name="itemtemplate"> <li> <asp:hyperlink runat=server Text='<%# DataBinder.Eval(Container.DataItem, "SiteName") %>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "SiteURL") %>'> </asp:hyperlink> </li> </template> <template name="footertemplate"> </ul> </template>

92 </asp:repeater> (<%# %>) DataBind DataSource DataLinks URL Repeater Template HTML <ul type="1"> HeaderTemplate </ul> FooterTemplate <li> SiteLinks ItemTemplate HeaderTemplate <table> FooterTemplate </Table> ItemTemplate <TR> </TR> ItemTemplate HeaderTemplate FooterTemplate ItemTemplate namespace Samples {... public class Repeater1Page : Page { protected Repeater linkslistrepeater; public ICollection SiteLinks { get { ArrayList sites = new ArrayList(); } } sites.add(new SiteInfo("Microsoft Home", " sites.add(new SiteInfo("MSDN Home", " sites.add(new SiteInfo("MSN Homepage", " sites.add(new SiteInfo("Hotmail", " return sites; protected override void OnLoad(EventArgs e) { base.onload(e);

93 } } if (!IsPostBack){ // DataBind the page the first time it is requested. // This recursively calls each control within the page's // control hierarchy. DataBind(); } public sealed class SiteInfo { private string sitename; private string siteurl; public SiteInfo(string sitename, string siteurl) { this.sitename = sitename; this.siteurl = siteurl; } } } public string SiteName { get { return sitename; } } public string SiteURL { get { return siteurl; } } Repeater1Page Page OnLoad DatBind Template Repeater DataBind DataSource ICollection SiteLinks Repeater DataSource ICollection SiteLinks ArrayList SiteLinks public public protected SiteInfo SiteName SiteURL ItemTemplate <asp:hyperlink runat=server Text='<%# DataBinder.Eval(Container.DataItem, "SiteName") %>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "SiteURL") %>'> </asp:hyperlink>

94 DataList DataList Style Page language="c#" src="datalist1.cs" inherits="samples.datalist1page"%>... <asp:datalist runat=server id="peopledatalist" RepeatColumns="2" RepeatDirection="Vertical" RepeatMode="Table" Width="100%"> <property name="alternatingitemstyle"> <asp:tableitemstyle BackColor="#EEEEEE"/> </property> <template name="itemtemplate"> <asp:panel runat=server font-size="12pt" font-bold="true"> <%# ((Person)Container.DataItem).Name %> </asp:panel> <asp:label runat=server Width="20px" BorderStyle="Solid" BorderWidth="1px" BorderColor="Black" BackColor='<%# ((Person)Container.DataItem).FavoriteColor %>'> </asp:label> <asp:label runat=server Font-Size="10pt" Text='<%# GetColorName(((Person)Container.DataItem).FavoriteColor) %>'> </asp:label> </template> </asp:datalist> RepeatColumns="2" DataList RepeatDirection= Vertical RepeatDirection= Horizontal, DataList Style Width AlternatingItemStyle namespace Samples {...

95 public class DataList1Page : Page { protected DataList peopledatalist; protected string GetColorName(Color c) { return TypeDescriptor.GetConverter(typeof(Color)).ConvertToString(c); } private void LoadPeopleList() { // create the datasource Person[] people = new Person[] { new Person("Nikhil Kothari", Color.Green), new Person("Steve Millet", Color.Purple), new Person("Chris Anderson", Color.Blue), new Person("Mike Pope", Color.Orange), new Person("Anthony Moore", Color.Yellow), new Person("Jon Jung", Color.MediumAquamarine), new Person("Susan Warren", Color.SlateBlue), new Person("Izzy Gryko", Color.Red) }; // set the control's datasource peopledatalist.datasource = people; } // and have it build its items using the datasource peopledatalist.databind(); protected override void OnLoad(EventArgs e) { base.onload(e); } } if (!IsPostBack){ // first request for the page LoadPeopleList(); } public sealed class Person { private string name; private Color favoritecolor; public Person(string name, Color favoritecolor) { this.name = name;

96 } this.favoritecolor = favoritecolor; } } public Color FavoriteColor { get { return favoritecolor; } } public string Name { get { return name; } } DataSource aspx DataBind DataSource DataSource Person ICollection DataSource DataSource HTML DataSource DataSource DataGrid DataGrid Title Title ID Author Price Publication date titlesdb.xml titlesdb.xml

97 <root> <schema id="documentelement" targetnamespace="" xmlns= xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <element name="title"> <complextype content="elementonly"> <element name="title_id" type="string"></element> <element name="title" type="string"></element> <element name="au_name" type="string"></element> <element name="price" msdata:datatype="system.currency" minoccurs="0" type="string"></element> <element name="pubdate" type="timeinstant"></element> </complextype> <unique name="titleconstraint" msdata:primarykey="true"> <selector>.</selector> <field>title_id</field> </unique> </element> </schema> <DocumentElement> <Title> <title_id>bu1032</title_id> <title>the Busy Executive's Database Guide</title> <au_name>marjorie Green</au_name> <price>19.99</price> <pubdate> t07:00:00</pubdate> </Title>... </DocumentElement> </root> web web service global.asax application_onstart xml DataSet Application (global.asax) public void Application_OnStart() { FileStream fs = null; DataSet ds = null; try {

98 fs = new FileStream(Server.MapPath("TitlesDB.xml"), FileMode.Open, ds = new DataSet(); FileAccess.Read); // load the data in the xml file into the DataSet ds.readxml(fs); } finally { if (fs!= null) { fs.close(); fs = null; } } } // cache the dataset into application state for use in individual pages Application["TitlesDataSet"] = ds; dg01.aspx <%@ Page language="c#" src="datagrid.cs" inherits="samples.datagridpage"%>... <asp:datagrid runat=server id="titlesgrid"> </asp:datagrid> (DataGrid.cs) namespace Samples {... public class DataGridPage : Page { protected DataGrid titlesgrid; public ICollection GetTitlesList() { // Retrieve the list of titles from the DataSet cached in // the application state. DataSet titlesdataset = (DataSet)Application["TitlesDataSet"]; if (titlesdataset!= null) { return titlesdataset.tables["title"].defaultview; } else {

99 } } return null; private void LoadTitlesGrid() { // retrieve the data from the database ICollection titleslist = GetTitlesList(); // set the control's datasource titlesgrid.datasource = titleslist; } // and have it build its items using the datasource titlesgrid.databind(); protected override void OnLoad(EventArgs e) { base.onload(e); } } } if (!IsPostBack){ // first request for the page LoadTitlesGrid(); }.cs OnLoad DataGrid DataBind DataGrid DataSet DataTable DataGrid AutoGenerateColumns True AutoGenerateColumns True DataGrid DataGrid DataSet DataGrid DataGrid BoundColumn (dg02.aspx) <%@ Page language="c#" src="datagrid.cs" inherits="samples.datagridpage"%>

100 ... <asp:datagrid runat=server id="titlesgrid" AutoGenerateColumns="false"> <property name="columns"> <asp:boundcolumn HeaderText="Title" DataField="title"/> <asp:boundcolumn HeaderText="Author" DataField="au_name"/> <asp:boundcolumn HeaderText="Date Published" DataField="pubdate"/> <asp:boundcolumn HeaderText="Price" DataField="price"/> </property> </asp:datagrid> dg02.aspx code-behind DataGrid.cs DataGrid AutoGenerateColumns false DataGrid DataSet HeaderText dg01.aspx BoundColumn BoundColumn BoundColumn Dg03.aspx DataGrid (dg03.aspx) Page language="c#" src="datagrid.cs" inherits="samples.datagridpage"%>... <asp:datagrid runat=server id="titlesgrid" AutoGenerateColumns="false" Width="80%" BackColor="White" BorderWidth="1px" BorderStyle="Solid" CellPadding="2" CellSpacing="0" BorderColor="Tan" Font-Name="Verdana" Font-Size="8pt"> <property name="columns"> <asp:boundcolumn HeaderText="Title" DataField="title"/>

101 <asp:boundcolumn HeaderText="Author" DataField="au_name"/> <asp:boundcolumn HeaderText="Date Published" DataField="pubdate" DataFormatString="{0:MMM yyyy}"/> <asp:boundcolumn HeaderText="Price" DataField="price" DataFormatString="{0:c}"> <property name="itemstyle"> <asp:tableitemstyle HorizontalAlign="Right"/> </property> </asp:boundcolumn> </property> <property name="headerstyle"> <asp:tableitemstyle BackColor="DarkRed" ForeColor="White" Font-Bold="true"/> </property> <property name="itemstyle"> <asp:tableitemstyle ForeColor="DarkSlateBlue"/> </property> <property name="alternatingitemstyle"> <asp:tableitemstyle BackColor="Beige"/> </property> </asp:datagrid> DataGrid dg02.aspx DataGrid.cs DataGrid WebControl Width BackColor BorderStyle Font DataGrid CellPadding DataGrid HeaderStyle AlternatingItemStyle DataGrid Price DataGrid BoundColumn DataFormatString String.Format DataFormatString ToString Dg04.aspx (dg04.aspx) Page language="c#" src="datagrid4.cs" inherits="samples.datagrid4page"%>... <asp:datagrid runat=server id="titlesgrid"

102 AutoGenerateColumns="false" Width="80%" BackColor="White" BorderWidth="1px" BorderStyle="Solid" CellPadding="2" CellSpacing="0" BorderColor="Tan" Font-Name="Verdana" Font-Size="8pt" DataKeyField="title_id" OnSelectedIndexChanged="OnSelectedIndexChangedTitlesGrid"> <property name="columns"> <asp:buttoncolumn Text="Select" Command="Select"/> <asp:boundcolumn HeaderText="Title" DataField="title"/> <asp:boundcolumn HeaderText="Author" DataField="au_name"/> <asp:boundcolumn HeaderText="Date Published" DataField="pubdate" DataFormatString="{0:MMM yyyy}"/> <asp:boundcolumn HeaderText="Price" DataField="price" DataFormatString="{0:c}"> <property name="itemstyle"> <asp:tableitemstyle HorizontalAlign="Right"/> </property> </asp:boundcolumn> </property> <property name="headerstyle"> <asp:tableitemstyle BackColor="DarkRed" ForeColor="White" Font-Bold="true"/> </property> <property name="itemstyle"> <asp:tableitemstyle ForeColor="DarkSlateBlue"/> </property> <property name="alternatingitemstyle"> <asp:tableitemstyle BackColor="Beige"/> </property> <property name="selecteditemstyle"> <asp:tableitemstyle BackColor="PaleGoldenRod" Font-Bold="true"/> </property> </asp:datagrid>... <asp:label runat=server id="selectioninfolabel" Font-Name="Verdana" Font-Size="8pt"/> DataGrid SelectedIndexChanged.cs select DataGrid SelectedItemStyle DataKeyField code-behind DataKeys

103 code-behind (DataGrid4.cs) namespace Samples {... public class DataGrid4Page : Page { protected DataGrid titlesgrid; protected Label selectioninfolabel; public ICollection GetTitlesList() { // Retrieve the list of titles from the DataSet cached in // the application state. DataSet titlesdataset = (DataSet)Application["TitlesDataSet"]; } if (titlesdataset!= null) { return titlesdataset.tables["title"].defaultview; } else { return null; } private void LoadTitlesGrid() { // retrieve the data from the database ICollection titleslist = GetTitlesList(); // set the control's datasource and reset its selection titlesgrid.datasource = titleslist; titlesgrid.selectedindex = -1; // and have it build its items using the datasource titlesgrid.databind(); } // update the selected title info UpdateSelectedTitleInfo(); protected override void OnLoad(EventArgs e) { base.onload(e); if (!IsPostBack){ // first request for the page LoadTitlesGrid();

104 } } // Handles the OnSelectedIndexChanged event of the DataGrid protected void OnSelectedIndexChangedTitlesGrid(object sender, EventArgs e) { UpdateSelectedTitleInfo(); } private void UpdateSelectedTitleInfo() { // get the selected index int selindex = titlesgrid.selectedindex; string seltitleid = null; string selectioninfo; if (selindex!=-1){ // display the key field for the selected title seltitleid = (string)titlesgrid.datakeys[selindex]; selectioninfo = "ID of selected title: " + seltitleid; } else { selectioninfo = "No title is currently selected."; } } } } selectioninfolabel.text = selectioninfo;.cs SelectedIndexChanged ID SelectedIndexChanged DataGrid Select SelectIndex OnSelectedIndexChangedTitlesGrid OnSelectedIndexChangedTitlesGrid UpdateSelectedTitleInfo ID ID ID DataKeys ASPX DataKeyField DataGrid

105 Repeater, DataList, or DataGrid? Repeater, DataList, DataGrid Repeater ID DataList DataGrid WebControl repeater Repeater repeater DataList repeater WebControl DataList DataList DataGrid DataList DataGrid DataGrid DataList DataGrid TemplateColumn Repeater DataList DataGrid Yes ( ) Yes ( ) () No No Yes Yes Yes No No Yes No No Yes Yes No Yes Yes No Yes Yes No Yes Yes No No Yes No No Yes

106 3.6.4 DataSet DataSource DataBind() ItemTemplate

2 ADO.NET Internet 1.2

2 ADO.NET Internet 1.2 C H A P T E R 1 ADO.NET XML ADO.NET ADO.NET.NET Framework.NET XML ADO.NET.NET Microsoft Visual Studio 200 ADO.NET ADO.NET 2 ADO.NET 1 1.1 1.1 1.1 1.2 Internet 1.2 1.1 Internet 2 1.2 (Internet) Web 1. ADO.NET

More information

untitled

untitled Data Source 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 8-1 Data Source 8-2 Data Source 8-3 Data Source 8-4 Data Source 8-5 DataSourceID 8-6 DataSourceMode 8-7 DataSource 8-8 8-9 Parameter Direction

More information

untitled

untitled 1 .NET 料.NET 料 料來 類.NET Data Provider SQL.NET Data Provider System.Data.SqlClient 料 MS-SQL OLE DB.NET Data Provider System.Data.OleDb 料 Dbase FoxPro Excel Access Oracle Access ODBC.NET Data Provider 料

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

VB控件教程大全

VB控件教程大全 Datagrid DataGrid1.Columns.Remove(0) ' 0 DataGrid1.Columns.Add(0).Caption= ' DataGrod1.Columns(0).DataField= Name ' Adodc1.Refresh DataGrid BackColor Font DataGrid CellPadding HTML CellSpacing HTML Width

More information

一 個 SQL Injection 實 例 的 啟 示 頁 2 / 6 因 此, 在 知 名 網 站 上 看 到 SQL Injection, 讓 人 驚 心, 卻 不 意 外 網 站 專 案 外 包 是 目 前 業 界 的 常 態, 而 在 價 格 取 勝 的 制 度 下, 低 價 得 標 的 S

一 個 SQL Injection 實 例 的 啟 示 頁 2 / 6 因 此, 在 知 名 網 站 上 看 到 SQL Injection, 讓 人 驚 心, 卻 不 意 外 網 站 專 案 外 包 是 目 前 業 界 的 常 態, 而 在 價 格 取 勝 的 制 度 下, 低 價 得 標 的 S 一 個 SQL Injection 實 例 的 啟 示 頁 1 / 6 你 的 網 站 在 裸 奔 嗎? 一 個 SQL Injection 實 例 的 啟 示 作 者 : 李 明 儒 SQL Injection( 資 料 隱 碼 攻 擊 ) 問 題 早 就 不 是 什 麼 新 聞, 但 前 陣 子 在 一 個 頗 具 知 名 度 的 活 動 網 站 上, 赫 然 發 現 它 大 刺 刺 地 現 身!

More information

untitled

untitled 12-1 -2 VC# Web Blog 12-1 -1-1 12-1.1-1 C:\ ChartModuleSample_CSharp\Application\2001\ Files\ 4096 KB 120 Web.Config httpruntime maxrequestlength executiontimeout 12-2

More information

untitled

untitled 1 LinkButton LinkButton 連 Button Text Visible Click HyperLink HyperLink 來 立 連 Text ImageUrl ( ) NavigateUrl 連 Target 連 _blank _parent frameset _search _self 連 _top 例 sample2-a1 易 連 private void Page_Load(object

More information

IsPostBack 2

IsPostBack 2 5 IsPostBack 2 TextBox 3 TextBox TextBox 4 TextBox TextBox 1 2 5 TextBox Columns MaxLength ReadOnly Rows Text TextMode TextMode MultiLine TextMode MultiLine True False TextMode MultiLine Password MulitLine

More information

3 Driver do Microsoft Access (*.mdb) hisdata IFIX 1.4

3 Driver do Microsoft Access (*.mdb) hisdata IFIX 1.4 IFix3.5 ACCESS ACCESS hisdata D:\Dynamics\SampleSystem\HistoricalData ODBC DSN hisdata 1 ODBC 1.1 2 1.2 3 Driver do Microsoft Access (*.mdb) 1.3 4 hisdata IFIX 1.4 1.4 5 Access 1.5 6 ODBC ifix3.5 1.6 1.6

More information

穨ac3-4.PDF

穨ac3-4.PDF 4-1 VBA Access 4-1-1 Access 2000 4-1 4-1 Access 2000 4-1 Visual Basic Access 2000 ( ADO DAO ) Access 2000 VBA Office Access VBA Access 8.0(97 ) DAO Access 2000 DAO ADO 2.1 OLE Automation ADO 2.1 DAO ADO

More information

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF Chapter 2 WF 2.1 WF 2.2 2. XAML 2. 2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF WF WF WF WF EDI API WF Visual Studio Designer 1 2.1 WF Windows Workflow Foundation 2 WF 1 WF Domain-Specific

More information

基于UML建模的管理管理信息系统项目案例导航——VB篇

基于UML建模的管理管理信息系统项目案例导航——VB篇 PowerBuilder 8.0 PowerBuilder 8.0 12 PowerBuilder 8.0 PowerScript PowerBuilder CIP PowerBuilder 8.0 /. 2004 21 ISBN 7-03-014600-X.P.. -,PowerBuilder 8.0 - -.TP311.56 CIP 2004 117494 / / 16 100717 http://www.sciencep.com

More information

<463A5CC2A4B6ABD1A7D4BA5CBDCCD1A7D6B8C4CFD7DC5CA1B656697375616C20432320B3CCD0F2C9E8BCC6A1B7BFCEB3CCD6B8C4CF2E646F63>

<463A5CC2A4B6ABD1A7D4BA5CBDCCD1A7D6B8C4CFD7DC5CA1B656697375616C20432320B3CCD0F2C9E8BCC6A1B7BFCEB3CCD6B8C4CF2E646F63> 目 录 Visual C# 程 序 设 计 课 程 指 南 计 算 机 科 导 论 课 程 指 南 8 计 算 机 网 络 基 础 课 程 指 南 4 网 络 工 程 课 程 设 计 课 程 指 南 0 网 络 应 用 与 实 践 课 程 指 南 4 ADO.net 课 程 指 南 7 C 程 序 设 计 课 程 指 南 数 字 信 号 处 理 DSP 课 程 指 南 9 电 子 电 路 EDA 技

More information

ThreeDtunnel.doc

ThreeDtunnel.doc (12) 1 1. Visual Basic Private Sub LoadDatabase() Dim strip As String Dim straccount As String Dim strpassword As String Dim strdatabase As String Dim strtable As String Dim strsql As String Dim strtemp1

More information

untitled

untitled 1 .NET 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Response 類 Write 料 Redirect URL Response.Write("!! ives!!"); Response.Redirect("WebForm2.aspx"); (1) (2) Web Form

More information

目錄

目錄 資 訊 素 養 線 上 教 材 單 元 五 資 料 庫 概 論 及 Access 5.1 資 料 庫 概 論 5.1.1 為 什 麼 需 要 資 料 庫? 日 常 生 活 裡 我 們 常 常 需 要 記 錄 一 些 事 物, 以 便 有 朝 一 日 所 記 錄 的 事 物 能 夠 派 得 上 用 場 我 們 能 藉 由 記 錄 每 天 的 生 活 開 銷, 就 可 以 在 每 個 月 的 月 底 知

More information

epub 61-2

epub 61-2 2 Web Dreamweaver UltraDev Dreamweaver 3 We b We b We Dreamweaver UltraDev We b Dreamweaver UltraDev We b We b 2.1 Web We b We b D r e a m w e a v e r J a v a S c r i p t We b We b 2.1.1 Web We b C C +

More information

RUN_PC連載_10_.doc

RUN_PC連載_10_.doc PowerBuilder 8 (10) Jaguar CTS ASP Jaguar CTS PowerDynamo Jaguar CTS Microsoft ASP (Active Server Pages) ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar Server ASP

More information

FileMaker 16 ODBC 和 JDBC 指南

FileMaker 16 ODBC 和 JDBC 指南 FileMaker 16 ODBC JDBC 2004-2017 FileMaker, Inc. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc. FileMaker WebDirect FileMaker Cloud FileMaker,

More information

untitled

untitled ADF Web ArcGIS Server ADF GeocodeConnection control 4-2 Web ArcGIS Server Application Developer Framework (ADF).NET interop semblies.net Web ADF GIS Server 4-3 .NET ADF Web Represent the views in ArcMap

More information

1 1 大概思路 创建 WebAPI 创建 CrossMainController 并编写 Nuget 安装 microsoft.aspnet.webapi.cors 跨域设置路由 编写 Jquery EasyUI 界面 运行效果 2 创建 WebAPI 创建 WebAPI, 新建 -> 项目 ->

1 1 大概思路 创建 WebAPI 创建 CrossMainController 并编写 Nuget 安装 microsoft.aspnet.webapi.cors 跨域设置路由 编写 Jquery EasyUI 界面 运行效果 2 创建 WebAPI 创建 WebAPI, 新建 -> 项目 -> 目录 1 大概思路... 1 2 创建 WebAPI... 1 3 创建 CrossMainController 并编写... 1 4 Nuget 安装 microsoft.aspnet.webapi.cors... 4 5 跨域设置路由... 4 6 编写 Jquery EasyUI 界面... 5 7 运行效果... 7 8 总结... 7 1 1 大概思路 创建 WebAPI 创建 CrossMainController

More information

FileMaker 15 ODBC 和 JDBC 指南

FileMaker 15 ODBC 和 JDBC 指南 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc. / FileMaker WebDirect FileMaker, Inc. FileMaker

More information

RUN_PC連載_12_.doc

RUN_PC連載_12_.doc PowerBuilder 8 (12) PowerBuilder 8.0 PowerBuilder PowerBuilder 8 PowerBuilder 8 / IDE PowerBuilder PowerBuilder 8.0 PowerBuilder PowerBuilder PowerBuilder PowerBuilder 8.0 PowerBuilder 6 PowerBuilder 7

More information

RUN_PC連載_8_.doc

RUN_PC連載_8_.doc PowerBuilder 8 (8) Web DataWindow ( ) DataWindow Web DataWindow Web DataWindow Web DataWindow PowerDynamo Web DataWindow / Web DataWindow Web DataWindow Wizard Web DataWindow Web DataWindow DataWindow

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY 0 SQL SQL SELECT DISTINCT city, state FROM customers; SQL SQL DBMS SQL DBMS SQL 0-1 SQL SQL 0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT

More information

untitled

untitled PowerBuilder Tips 利 PB11 Web Service 年度 2 PB Tips PB9 EAServer 5 web service PB9 EAServer 5 了 便 web service 來說 PB9 web service 力 9 PB11 release PB11 web service 力更 令.NET web service PB NVO 論 不 PB 來說 說

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 [email protected] www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F 1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o

More information

<4D6963726F736F667420576F7264202D20C9CFBAA3CAD0BCC6CBE3BBFAB5C8BCB6BFBCCAD4C8FDBCB6BFBCCAD4B4F3B8D95FBDA8D2E9B8E55F5F303632352E646F63>

<4D6963726F736F667420576F7264202D20C9CFBAA3CAD0BCC6CBE3BBFAB5C8BCB6BFBCCAD4C8FDBCB6BFBCCAD4B4F3B8D95FBDA8D2E9B8E55F5F303632352E646F63> 上 海 市 高 等 学 校 计 算 机 等 级 考 试 ( 三 级 ) 考 试 大 纲 -- 建 议 稿 -- 2007-6-25 25 目 录 上 海 市 高 等 学 校 计 算 机 等 级 考 试 三 级 总 体 说 明 -----------------1 三 级 ( 计 算 机 系 统 与 网 络 技 术 ) 考 试 大 纲 ---------------------2 三 级 ( 管 理

More information

Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f

Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f Web Chapter 22 SharePoint Web Microsoft Office SharePoint Server MOSS Web SharePoint Web SharePoint 22 Web 21 22-1 SharePoint Web Web SharePoint Web Web f Lists.asmx Web Web CAML f Views.asmx View SharePoint

More information

untitled

untitled OO 1 SQL Server 2000 2 SQL Server 2000 3 SQL Server 2000 DDL 1 2 3 DML 1 INSERT 2 DELETE 3 UPDATE SELECT DCL 1 SQL Server 2 3 GRANT REVOKE 1 2 1 2 3 4 5 6 1 SQL Server 2000 SQL Server SQL / Microsoft SQL

More information

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2.

p.2 1 <HTML> 2 3 <HEAD> 4 <TITLE> </TITLE> 5 </HEAD> 6 7 <BODY> 8 <H3><B> </B></H3> 9 <H4><I> </I></H4> 10 </BODY> </HTML> 1. HTML 1. 2. 2005-06 p.1 HTML HyperText Mark-up Language 1. HTML Logo, Pascal, C++, Java HTML 2. HTML (tag) 3. HTML 4. HTML 1. HTML 2. 3. FTP HTML HTML html 1. html html html cutehtmleasyhtml 2. wyswyg (What you see

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

教案模板4-2

教案模板4-2 传 智 播 客 ASP.NET 就 业 实 例 教 程 教 学 设 计 课 程 名 称 :ASP.NET 就 业 实 例 教 程 授 课 年 级 : 2015 年 级 授 课 学 期 : 2015 学 年 第 二 学 期 教 师 姓 名 : 某 某 老 师 2015 年 02 月 02 日 课 题 名 称 第 2 章 ADO.NET 计 划 学 时 6 课 时 内 容 分 析 教 学 目 标 及 基

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

Visual Basic D 3D

Visual Basic D 3D Visual Basic 2008 2D 3D 6-1 6-1 - 6-2 - 06 6-2 STEP 1 5-2 (1) STEP 2 5-3 (2) - 6-3 - Visual Basic 2008 2D 3D STEP 3 User1 6-4 (3) STEP 4 User1 6-5 (4) - 6-4 - 06 STEP 5 6-6 (5) 6-3 6-3-1 (LoginForm) PictureBox1

More information

學 科 100% ( 為 單 複 選 題, 每 題 2.5 分, 共 100 分 ) 1. 請 參 閱 附 圖 作 答 : (A) 選 項 A (B) 選 項 B (C) 選 項 C (D) 選 項 D Ans:D 2. 下 列 對 於 資 料 庫 正 規 化 (Normalization) 的 敘

學 科 100% ( 為 單 複 選 題, 每 題 2.5 分, 共 100 分 ) 1. 請 參 閱 附 圖 作 答 : (A) 選 項 A (B) 選 項 B (C) 選 項 C (D) 選 項 D Ans:D 2. 下 列 對 於 資 料 庫 正 規 化 (Normalization) 的 敘 ITE 資 訊 專 業 人 員 鑑 定 資 料 庫 系 統 開 發 與 設 計 實 務 試 卷 編 號 :IDS101 注 意 事 項 一 本 測 驗 為 單 面 印 刷 試 題, 共 計 十 三 頁 第 二 至 十 三 頁 為 四 十 道 學 科 試 題, 測 驗 時 間 90 分 鐘 : 每 題 2.5 分, 總 測 驗 時 間 為 90 分 鐘 二 執 行 CSF 測 驗 系 統 -Client

More information

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6 www.brainysoft.net 1.JasperReport ireport...4 1.1 JasperReport...4 1.2 ireport...4 2....4 2.1 JDK...4 2.1.1 JDK...4 2.1.2 JDK...5 2.1.3 JDK...5 2.2 ant...6 2.2.1 ant...6 2.2.2 ant...6 2.3 JasperReport...7

More information

多層次傳銷與獎金系統

多層次傳銷與獎金系統 醒 吾 技 術 學 院 資 訊 管 理 系 ( 五 專 部 ) 九 十 六 學 年 度 畢 業 專 題 多 層 次 傳 銷 與 獎 金 系 統 組 員 : 921506122 游 濬 瑋 921506126 陳 彥 宇 921506139 林 龍 華 921506144 陳 昶 志 921506149 楊 璧 如 指 導 老 師 : 汪 淵 老 師 中 華 民 國 九 十 七 年 一 月 十 一 醒

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

Chapter 16 集合

Chapter 16 集合 Chapter 16 集合 20 ArrayList StringCollection 16 本章學習目標 : ArrayList ArrayList Array StringCollection 16-1 21 10-3-8 System.Array Clear Clear 16-1 Clear System.Array Microsoft System.Collection IList 542

More information

untitled

untitled -JAVA 1. Java IDC 20 20% 5 2005 42.5 JAVA IDC JAVA 60% 70% JAVA 3 5 10 JAVA JAVA JAVA J2EE J2SE J2ME 70% JAVA JAVA 20 1 51 2. JAVA SUN JAVA J2EE J2EE 3. 1. CSTP CSTP 2 51 2. 3. CSTP IT CSTP IT IT CSTP

More information

mv t ï Catch ex As Exception MessageBox.Show(" «t ï ") Finally ' myconnection.close() End Try SqlConnection(ByVal connectionstring As String) pâ nç á

mv t ï Catch ex As Exception MessageBox.Show( «t ï ) Finally ' myconnection.close() End Try SqlConnection(ByVal connectionstring As String) pâ nç á ! kƒà ï ï ugv º h t ï s p w Connection g o Ç hâe Connection g à t ï u k ï o Ãh Ý ƒà mv tj ï s mv t SQL Server Access ïë mv t Exce ÌÞ 3-1 mv t SQL Server t SQL Server SQL Server.NET Framework ï ± SqlConnection

More information

epub 61-6

epub 61-6 6 We b 6.1 6.1.1 R e c o r d s e t 6-1 6-1 6.1.2 166 Dreamweaver UltraDev 6-2 6-2 6-3 3 6-3 I I S 6 167 Tr a i n M i s 6-4 6-4 6.1.3 10 000 1 K 10 000K 10 M 6-5 Dreamweaver UltraDev Repeat Region 6-5 168

More information

untitled

untitled JavaEE+Android - 6 1.5-2 JavaEE web MIS OA ERP BOSS Android Android Google Map office HTML CSS,java Android + SQL Sever JavaWeb JavaScript/AJAX jquery Java Oracle SSH SSH EJB+JBOSS Android + 1. 2. IDE

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

Oracle 4

Oracle 4 Oracle 4 01 04 Oracle 07 Oracle Oracle Instance Oracle Instance Oracle Instance Oracle Database Oracle Database Instance Parameter File Pfile Instance Instance Instance Instance Oracle Instance System

More information

上海市教育考试院关于印发新修订的

上海市教育考试院关于印发新修订的 沪 教 考 院 社 考 2012 7 号 上 海 市 教 育 考 试 院 关 于 印 发 上 海 市 高 等 学 校 计 算 机 等 级 考 试 大 纲 (2012 年 修 订 ) 的 通 知 各 有 关 高 校 : 为 进 一 步 加 强 本 市 高 校 计 算 机 基 础 教 学 工 作, 推 进 学 校 更 加 科 学 合 理 地 设 置 计 算 机 基 础 课 程 及 安 排 教 学 内 容,

More information

数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护

数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护 数 据 库 系 统 基 础 1/54 数 据 库 系 统 基 础 哈 尔 滨 工 业 大 学 2011.~2012. 数 据 库 系 统 基 础 2/54 第 6 章 数 据 库 管 理 与 维 护 数 据 库 系 统 基 础 3/54 第 6 章 数 据 库 管 理 与 维 护 6.1 数 据 库 管 理 员 的 基 本 职 责 6.2 数 据 库 存 储 与 性 能 管 理 6.3 数 据 库

More information

f2.eps

f2.eps 前 言, 目 录 产 品 概 况 1 SICAM PAS SICAM 电 力 自 动 化 系 统 配 置 和 使 用 说 明 配 置 2 操 作 3 实 时 数 据 4 人 机 界 面 5 SINAUT LSA 转 换 器 6 状 态 与 控 制 信 息 A 版 本 号 : 08.03.05 附 录, 索 引 安 全 标 识 由 于 对 设 备 的 特 殊 操 作 往 往 需 要 一 些 特 殊 的

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

untitled

untitled Database System Principle Database System Principle 1 SQL 3.1 SQL 3.2-3.3 3.4 3.5 3.6 Database System Principle 2 3.1 SQL SQL Structured Query Language SQL Database System Principle 3 SQL 3.1.1 SQL 3.1.2

More information

RunPC2_.doc

RunPC2_.doc PowerBuilder 8 (5) PowerBuilder Client/Server Jaguar Server Jaguar Server Connection Cache Thin Client Internet Connection Pooling EAServer Connection Cache Connection Cache Connection Cache Connection

More information

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787

(CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 Web (CIP) Web /,. :,2005. 1 ISBN 7 81058 782 X.W............T P393.4 CIP (2004) 118797 Web ( 99 200436) ( http:/ / www.shangdapress.com 66135110) : * 787 1092 1/ 16 30.75 748 2005 1 1 2005 1 1 : 1 3 100

More information

ebook 96-16

ebook 96-16 16 13 / ( ) 16-1 SQL*Net/Net8 SQL*Net/Net8 SQL*Net/Net8 16-1 / S Q L SQL*Net V2 N e t 8 S Q L * N e t N e t ( ) 16.1 S Q L O r a c l e S Q L 16 401 ) ( H R _ L I N K create database link p u b l i c (

More information

ebook 165-5

ebook 165-5 3 5 6 7 8 9 [ 3. 3 ] 3. 3 S Q L S Q 4. 21 S Q L S Q L 4 S Q 5 5.1 3 ( ) 78 5-1 3-8 - r e l a t i o n t u p l e c a r d i n a l i t y a t t r i b u t e d e g r e e d o m a i n primary key 5-1 3 5-1 S #

More information

MVB-1001.DOC

MVB-1001.DOC 20 1.5 10 15 20 25 80 100 CSF 1. 2. 0105 3. 4. 5. 30% 1.5 0.75 1. Visual Basic Visual Basic (A) Visual Basic Enterprise Edition (B) Visual Basic Script Edition (C) Visual Basic Learning Edition (D) Visual

More information

untitled

untitled II III IV V VI VII VIII IX 2 ASP 1 ASP 3 4 ASP Web CGI ISAPI OLEISAPI Perl IDC ASP dbweb Perl IDC ASP dbweb IDC 1 ASP 5 Web Web DLL 6 ASP 1 ASP 7 8 ASP 1 ASP 9 10 ASP 1 ASP 11 12 ASP 1 ASP 13 14 ASP 1

More information

PPBSalesDB.doc

PPBSalesDB.doc Pocket PowerBuilder SalesDB Pocket PowerBuilder PDA Pocket PowerBuilder Mobile Solution Pocket PowerBuilder Pocket PowerBuilder C:\Program Files\Sybase\Pocket PowerBuilder 1.0 %PPB% ASA 8.0.2 ASA 9 ASA

More information

WinMDI 28

WinMDI 28 WinMDI WinMDI 2 Region Gate Marker Quadrant Excel FACScan IBM-PC MO WinMDI WinMDI IBM-PC Dr. Joseph Trotter the Scripps Research Institute WinMDI HP PC WinMDI WinMDI PC MS WORD, PowerPoint, Excel, LOTUS

More information

自动化接口

自动化接口 基 于 文 件 的 数 据 交 换 的 注 意 事 项 1 SPI 2 COMOS Automation 操 作 手 册 通 用 Excel 导 入 3 通 过 OPC 客 户 端 的 过 程 可 视 化 4 SIMIT 5 GSD 6 05/2016 V 10.2 A5E37093378-AA 法 律 资 讯 警 告 提 示 系 统 为 了 您 的 人 身 安 全 以 及 避 免 财 产 损 失,

More information

Business Objects 5.1 Windows BusinessObjects 1

Business Objects 5.1 Windows BusinessObjects 1 Business Objects 5.1 Windows BusinessObjects 1 BusinessObjects 2 BusinessObjects BusinessObjects BusinessObjects Windows95/98/NT BusinessObjects Windows BusinessObjects BusinessObjects BusinessObjects

More information

A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2

A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ / ] NotePad A-2 HTML A-1 HTML A-2 A-2 HTML A-8 A-3 A-14 A-4 A-26 A-5 A-30 A-6 A-42 A-1 HTML A-1-1 HTML 1 HTML JSP HTML HTML HTML JSP A HTML HTML HTML HTML HTML HTML HTML HTML.htm.html HTML Windows NotePad HTML IE [ /

More information

<ADB6ADB1C25EA8FAA6DB2D4D56432E706466>

<ADB6ADB1C25EA8FAA6DB2D4D56432E706466> packages 3-31 PART 3-31 03-03 ASP.NET ASP.N MVC ASP.NET ASP.N MVC 4 ASP.NET ASP.NE MVC Entity Entity Framework Code First 2 TIPS Visual Studio 20NuGetEntity NuGetEntity Framework5.0 CHAPTER 03 59 3-3-1

More information

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式 導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式語言篇第 3 章 C# 程式語言基礎 C# C# 3.0 var 第 4 章 基本資料處理 C# x

More information

XXXXXXXX http://cdls.nstl.gov.cn 2 26

XXXXXXXX http://cdls.nstl.gov.cn 2 26 [ ] [ ] 2003-7-18 1 26 XXXXXXXX http://cdls.nstl.gov.cn 2 26 (2003-7-18) 1...5 1.1...5 1.2...5 1.3...5 2...6 2.1...6 2.2...6 2.3...6 3...7 3.1...7 3.1.1...7 3.1.2...7 3.1.2.1...7 3.1.2.1.1...8 3.1.2.1.2...10

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Microsoft Word - 小心翼翼的二十一點N.doc

Microsoft Word - 小心翼翼的二十一點N.doc 投 稿 類 別 : 資 訊 類 篇 名 : 小 心 翼 翼 的 二 十 一 點 作 者 : 陳 鈺 文 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 李 伯 謙 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 胡 家 媛 國 立 瑞 芳 高 級 工 業 職 業 學 校 資 訊 二 指 導 老 師 : 周 曉 玲 老 師 陳 思 亮 主 任 壹 前 言 一 研 究 動 機 平

More information

ebook45-5

ebook45-5 5 S Q L SQL Server 5.1 5-1 SQL Server 5-1 A B S A C O S A S I N ATA N AT N 2 C E I L I N G C O S C O T D E G R E E S E X P F L O O R L O G L O G 10 P I P O W E R R A D I A N S R A N D R O U N D S I G N

More information

目錄... ivv...vii Chapter DETECT

目錄... ivv...vii Chapter DETECT ... ivv...vii Chapter 1 1.1... 5 1.2... 6 1.3 DETECT... 11 1.3.1... 12 1.3.1.1...12 1.3.1.2...13 1.3.1.3...14 1.3.1.4...15 1.3.1.5...15 1.3.1.6...16 1.3.2 DETECT... 17 1.3.3... 19 1.3.4... 20... 22 Chapter

More information

使用SQL Developer

使用SQL Developer 使 用 SQL Developer 达 成 的 目 标 / 方 案 1 创 建 一 个 新 的 数 据 库 连 接 ; 2 在 SQL Developer 中 查 看 数 据 库 对 象 的 信 息 修 改 数 据 ; 3 在 SQL Developer 中 创 建 表 ; 4 在 SQL Developer 中 创 建 索 引 ; 5 在 SQL Developer 中 创 建 函 数 ; 6 在

More information

SiteView技术白皮书

SiteView技术白皮书 SiteView ECC V6.2 技 术 白 皮 书 游 龙 网 络 科 技 ( 中 国 ) 有 限 公 司 DragonFlow Networks(China),Inc. 目 录 第 一 章 产 品 概 述... 3 第 二 章 系 统 结 构... 6 一 系 统 架 构... 7 1 用 户 管 理 模 块... 7 2 Web Server... 8 3 存 储 加 密 模 块... 8

More information