Use VFP to make database dynamic queries on the Internet

xiaoxiao2021-03-06  94

∫ ∫ NTERNET Make a database dynamic query, the key issue is to establish a connection to the database on the Internet, which has many ways to establish a connection with the database on the Internet, such as CGI, ASP, JSP, etc. Here, an introduction to the VFP6. 0 Simple programming statements and HTML standard formats combine to establish a FoxPro database connection method, this approach has a great help to introduce Internet programming in my country's early DBASE database developers. Its most basic idea is to return a file with FoxPro (not a general process or function returning a narrow value) HTML file. This way the client browser provides parameters When the server requests acquisition data, the server is returned to the client-side procedure to run FoxPro based on the client side, so that the client browser translates the HTML format document into our See the data web page. Environment: WIN98 operating system, web personal server system, ASP server system, VFP6.0. (The installation method of these software is relatively simple, and can be done according to the software installer prompt). An example is described below to explain its production process: first build a directory GD on C, and create a data table TT.DBF (previously known database) field is Code and Item, and enter data. 1. Creating a DLL in VFP6.0 Creating a new project file GD.pjx in the project manager in VFP6.0, and then create a new class GD.vcx in the class tab in the IP, which is derived from the Custom class, then In the main menu class option, enter the class information dialog box, select the OLE public, press the OK button to exit, then enter the new method program in the main menu class option to add a method for a public method, Press to close, then right-click, enter the GD.vcx (GD) Properties dialog box, find Li in the method program and double-click the mouse to edit the program, and enter the following: lParameters Ivar, InIfile, IniflagSet Default to C: / gduse ttset textMerge Onset textMerge to li_hua_01.htm $ # @ 60; table $ # @ 62; scan $ # @ 60; TR $ # @ 62; $ # @ 60; td $ # @ 62; $ # @ 60; $ # @ 60; alltrim (code) $ # @ 62; $ # @ 62; $ # @ 60; / td $ # @ 62; $ # @ 60; $ # @ 60; alltrim (item ) $ # @ 62; $ # @ 62; $ # @ 60; / td $ # @ 62; $ # @ 60; / tr $ # @ 62; endscan $ # @ 60; set textMerge Offset textmerge tocreate cursor temp (mm m) append blankappend memo mm from li_hua_01.htmvr = temp.mmuse in tempclose database allerase li_hua_01.htmreturn vr save and close off the stored procedures and methods gd.vcx (gd) class designer, in gd In the project manager, click Continent, select the COM DL Ci Fu  庋  屯 屯 薵 D. DLL production, and registered this class in the machine. Second, making an ASP document settings C: / GD this directory to run.

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

New Post(0)