DELPHI办公管理系统 第6页项文文献
two-dimensional cake chart, uses in to demonstrate each kind of result the student counts; One ADO controls AdScore uses in to connect the database; One DataGrid controls DgScore uses in by the form form demonstration database content.
The work process is: Double strikes the cake chart some region, then DgScore demonstrates the corresponding result the student name list.
Code as follows:
Option Explicit
Dim SelectedSeries as Integer ' from definition variable
Dim Rs () as String ' withdraws the character string array which the record compendium uses
Private Sub Form_Load ()
' Establishes DataGrid controls the data pool
DgScore.DataSource= " AdScore "
' Establishes ADO controls the connection character string and the initial record source, namely demonstration content
AdScore.ConnectString= " Provider=Microsoftc.oledb.3.51; Persist_Security Info=False; Data Source= student information "
AdScore.RecordSource= " selet * from student result order by result "
AdScore.Refresh
' Supposes in advance withdraws the SQL sentence which the recording uses
Rs (1) = " select * from the student result where result = " + Chr (34) + " is superior " + _Chr (34) + " order the by result "
Rs (2) = " select * from the student result where result = " + Chr (34) + " is good " + _Chr (34) + " order the by result "
Rs (3) = " select * from student result where result = " + Chr (34) + " center " + _Chr (34) + " order by result "
Rs (4) = " select * from student result where result = " + Chr (34) + " difference " _Chr (34) + " order by result "
End Sub
Private Sub MC$score_SeriesSelected (Series as Integer, MouseFlags as _Integer, Cancel as Integer)
SelectedSeries=Series
End Sub
Private Sub MC$score_PointSelected (Series as Integer, DataPoint as_Integer, MouseFlags as
Integer, Cancel as Integer)
SelectedSeries=Series
End Sub
Private Sub MC$score_Db1Click ()
' Changes ADO controls the record source and renovates
Adoc1.RecordSource=Rs (SeletedSeries)
Adoc1.Refresh
End Sub
---- VB does for the rapid application development (RAD) the tool more and more obtains the development personnel's approval and accepts. It to many API (for example ODBC API, SOCKET API and so on) the seal causes the programming to change is simple. At the same time, it supports under the integrated development environment visible, the event actuates, to be object-oriented and so on the programming characteristic. Under, we chat in VB transfer the memory process the realization method and its the matters needing attention.
---- We know, the VB database programming has permits the many kinds of method, for instance straight takes over the use of ODBC the API programming, this method is flexible, is highly effective, the programmer may realize to the database complex control; Also may use in VB the data object, like RDO (long-distance data object), DAO (data visit object), ADO (ActiveX data object), this method realizes conveniently, quickly, but flexible worse somewhat. As a result of memory process in realization data
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
DELPHI办公管理系统 第6页下载如图片无法显示或论文不完整,请联系qq752018766