Tutorials to .com

Tutorials to .com » Database » Foxpro » INTERNET use VFP to create a database in Dynamic Query

INTERNET use VFP to create a database in Dynamic Query

Print View , by: iSee ,Total views: 39 ,Word Count: 1317 ,Date: Sun, 19 Apr 2009 Time: 12:08 AM

NTERNET database to create dynamic query, the key issue is the establishment of the INTERNET connection with the database, and databases in the INTERNET There are many ways to establish a connection, such as CGI, ASP, jsp and so on, are here for a simple use of VFP6.0 statement and the way the standard HTML format combining foxpro database connection set up method, this method is a lot of our early DBASE database developers programming with the introduction of INTERNET great help. Its basic idea is to use the process of FOXPRO to return to a file (not a process or function return value is a narrow sense) HTML document. This provided the client browser request parameters to obtain data on the server, the server-side to provide the parameters in accordance with the client running in server-side process FOXPRO client back to the format of a HTML document, so that the client browser to be translated into HTML format of the document we have see data page.

Environment: WIN98 operating systems, WEB individual server systems, asp Server System, VFP6.0. (The software is relatively simple installation method, depending on the software installation program prompts you to do).

Case of the following detailed description of its production process:

First of all, to build a site in the c directory gd, and create a data table tt.dbf (formerly known as the database) field for code and item, and enter the data.

A, VFP6.0 create a DLL

Projects in VFP6.0 Manager create a new project document GD.PJX, project manager and then type in a new category tab gd.vcx, its derivative in the custom category, and then type in the main menu options to enter the Class Information dialog box, choose the category for OLE public, according to exit the OK button, and then type in the main menu options to enter the new method of procedure to add a li visibility approach procedure for the public, according to the closure of exit, and then press the right mouse button to enter gd.vcx (gd) Properties dialog box, in the methods of procedure and double-click the mouse to find li process into its editing window, and enter the following:

lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr
lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr
lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr
lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr
lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr
lparameters ivar,inifile,iniflag
set default to c:/gd
use tt
set textmerge on
set textmerge to li_hua_01.htm
$#@60;table$#@62;
scan
$#@60;tr$#@62;$#@60;td$#@62;$#@60;$#@60;alltrim(code)$#@62;$#@62;$#@60;/td$#@60;/td$#@62;$#@60;$#@60;alltrim(item)$#@62;$#@62;$#@60;/td$#@62;$#@60;/tr$#@62;
endscan
$#@60;table$#@62;
set textmerge off
set textmerge to
create cursor temp (mm m)
append blank
append memo mm from li_hua_01.htm
vr=temp.mm
use in temp
close database all
erase li_hua_01.htm
return vr

Save and then close the program and the closure of this method to preserve gd.vcx (gd) type designer in the project manager gd click even for the election even for the com dlTuen ǎ complete flash d. dll's production, and aircraft registered in the class library.

Second, the production of ASP files

Individuals in the WEB server system settings C: / gd this directory to be run. And ASP in this directory to create a document (gd.asp), says:

$ # @ 60; HTML $ # @ 62;

$ # @ 60; HEAD $ # @ 62;

Database query page

$#@60;/HEAD$#@62;
$#@60;BODY $#@62;
$#@60;%SET gd=server.createobject("gd.gd")%$#@62;
$#@60;%=gd.li%$#@62;
$#@60;/BODY$#@62;
$#@60;/HTML$#@62;

In the browser so that you type the hyperlink http:// to your computer name / gd http:// to your computer name / gd the virtual directory / gd.asp data to see the top of the case on its production of only the basic ideas and methods, as long as the understanding of the basic ideas and methods and use your rich vfp programming techniques, you can create a variety of dynamic database page.


FoxPro Tutorial Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.