Rave Usage Experience (22): An example of connecting ADO databases in RAVE

zhaozj2021-02-12  140

An example of connecting ADO databases in RAVE

(1) placing a control ADOConnection1, setting its properties ConnectionString = 'Provider = Microsoft.Jet.OLEDB.4.0; Data Source = D: / ProgramXPPro / Mic' 'rosoft Office / Office10 / Samples / ADDRBOOK.MDB; Persist Security Inf ' ' O = false 'connect = true

(2) Place the control AdoQuery1, set its attribute connection = adoconnection1 sql.strings = ('SELECT name as name, surname AS Xin from family member') Active = TRUE

(3) Place the control RVDataSetConnection1, set its attribute dataset = adoQuery1 (4) Place the control RvProject1 and Rvsystem1, set its properties RvProject1.Engine = rvsystem1

(5) Double-click control RvProject1 to open the visual report designer and save the current report project file as adotest.rav.

(6) Open the Data Connections dialog by menu path "File" | "New Data Object", after selecting Direct Data View, then select RVDataSetConnection1 (DT), and other options are default, then select Next.

(7) Select DataView1 in the Simple Table dialog box by menu path, "Simple Table", after selecting DataView1 in the Simple Table dialog, after the next step, select the ALL (all fields), after the next step, the other saves the lack province.

(8) By F9, preview the quotation effect.

(9) Save the current report project file. Exit the visual report designer and return to the IDE of Delphi 7.

(10) Set the property of the control RVProject1 ProjectFile = 'E: /STUDY/Delphi/rave/022/adotest.rav' (11) Add button Button1, write it click the event handler,

Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); Begin Rvproject1.execute;

(12) Save the project file, compile the application, run the application!

转载请注明原文地址:https://www.9cbs.com/read-7402.html

New Post(0)