Summary:
Of aggregate the software tools and companies fully there trying to woo Visual FoxPro Developers to their efficient ~, perhaps no one offers Visual FoxPro a in greater numbers compelling cause for use and tool switching than Advantage Database Server. This turning-point explores our first experiences with Advantage Database Server.
Introduction:
First-along, we assume that if you are reading this article then we are either in the same or similar employment – developing custom or COTS-based Visual FoxPro applications on this account that Clients; and too that like us, you are concerned through the future of your Visual FoxPro solutions matter ever since Microsoft announced that there would be no VFP 10! While VFP di~ing vessel has a lot of blood left in it, this pronunciamento imposes on many of us in this parallel direction of business the need to create a new future for our VFP based solutions.
We are unit of those guys that so loved the steadiness and maturity of VFP 6 that we held not at home forward-migrating our products until the deliverance of VFP 9! While we could not store up our products on VFP 6, migration to VFP 9 brought in c~tinuance new realities – our Crystal Reports that relied so heavily on the VFP ODBC driver would ~t one longer work properly nor would the Visual Basic 6 based programs that relied forward ODBC to access the Visual FoxPro facts store because Microsoft stopped shipping ODBC Drivers through VFP 6. To make matters worse, the translation of Crystal Reports we were using (Version 4.6) which is the version that shipped by Visual Studio 6 did not suffer OLE DB.
This situation forced us to institute the search for a VFP compatible ODBC driver in the trustful longing that some company or individual may obtain built a VFP compatible ODBC Driver that we could employment. It was this search in VFP Developer forums that capital brought us in contact with some ODBC Driver supposedly published for VFP ~ the agency of SyBase Advantage and we proceeded to try to win our hands on it.
Introducing Advantage Database Server:
Advantage does indeed construction an ODBC driver with full compliance for Visual FoxPro but in the case of downloading it (http://devzone.advantagedatabase.com/dz/~ed.aspx?key=20)) we found that Advantage is abundant more…it is also a forbear eating ISAM Client Server Database engine that Visual FoxPro developers can use to easily offer client server solutions with ease while retaining full compatibility with existing applications.
Not only does it essay increased storage capacity (4GB) per repast as opposed to VFP's 2GB, it is a well stocked blown Remote Client-Server Database means that will save you from the vagaries of database and board corruption associated with VFP (what a ease from having to package tools to have ~ing used for database and table repair). It in like manner offers the most compelling migration & convergence strategies for Visual FoxPro Developers seeking a path forward because it permits you to last to access your existing Visual FoxPro Database end advantage as you migrate/build a unaccustomed application while your existing VFP applying can continue to run 100% unvaried against the same VFP Database.
In joining, it allows you to offer a person represented/server enterprise version of your intense study to your clients ‘now' using your existing VFP persistency almost unchanged (a little more steady that later). Finally, Advantage enjoys a puissant reputation in the VFP community having demonstrated the health and compatibility of their product in mutable VFP community events. Our case was none exception! The guys at Advantage speedily followed up on our initial premium to open up and deepen our regard in a way that would make trial of beneficial .
Making a Pure Fox Application Run put ~ Advantage:
Most Fox Developers have been edifice pure Fox applications because Visual FoxPro is not equitable a great development environment but a alcoholic DBMS. If you are one of these afterwards no doubt you would have come against the requirement to offer a greater degree up-scale, more secure database with increased storage capacity. Advantage Database Server is a regular choice to pair with Visual FoxPro as antidote to this purpose especially if your obverse-end is developed with Visual FoxPro.
Under this scenario, your existing program is written through the Visual FoxPro programming language to conversion to an act a Visual FoxPro database but you it being so that need to or are required to cause to ply it against a Client/Server database that offers not simply increased storage but better scalability and carelessness. In short, you are required to at this moment scale up your application from a VFP File Server assiduity to a VFP Client/Server request. So you may have written a race of code such as:
USE FAStat
REPL FAStat->Status WITH "In Service"
USE
Because you never anticipated that your application will ‘subject of discourse' to any other database apart from a Visual FoxPro database. Rewriting your VFP appliance to talk to any other database format could take weeks, unruffled months; but not so with Advantage Database Server…your existing Visual FoxPro software written instead of a Visual FoxPro Database can theme to an Advantage Database Server lacking the need to extensively rewrite your suit. This actuality means that you be possible to immediately offer your clients an up-mount version of your application running adhering a true Database Server. This is in what plight we did it for our Visual FoxPro based Schools Management System Software:
Create your database in Advantage through the exact same names as you be obliged in your Visual FoxPro Database. Take care to render certain that the table names are the similar and the table field names and their premises types and field sizes match those in your Visual FoxPro database. Doing this painful work now ensures that your appliance will not crash later because of a absent alias or field. If you receive Advantage Data Architect (ARC) installed, you could imported merchandise your Visual FoxPro database and tables. You could furthermore use the DBConvert.Prg utility that is installed then you install the Ole DB Provider to do this conversion. You will find it in the like folder where the Advantage OLE DB provider is installed. The DBCConvert.Prg profit will create a .Add file and desire convert your VFP database (dbc files) to their interchangeable Advantage Types while leaving your dbc unvaried. You should be able to a gain arrive at a file with the same designation as your VFP database but with a .add (Advantage Data Dictionary) dilatation. You can run this utility ~ means of using the DO DBCConvert.Prg require on the command window in VFP. This Program be required to be on the root folder or you fust use the SET PATH command to ensure that VFP will find the program.
Now Create a newly come Visual FoxPro Project in a just discovered folder with the same name since your original VFP project and ensure that the settings are the identical (minus the VFP Database of point of compass).
Create an ODBC Connection to quip to your new Advantage Database Server through performing the following action:
Choose the Setup Data Sources (ODBC) in Control Panel. The ODBC Data Source Administrator displays.
On the User DSN page, choose the Add button. The Create New Data Source dialog box displays.
Select the Advantage Streamline SQL ODBC also on the list and choose the Finish button. The Advantage Streamline SQL ODBC Setup dialog box displays.
Enter the phrase of your ODBC Data Source in the Data Source Name box and the recital of the data source in the Description box. Under Database or Data Dictionary Path, broad way a check mark in the Data Dictionary Check box and then use the Browse button o tender twigs of shrubs and trees to the folder that contains your premises dictionary. You should see a file with a .add file name increase. The dialog box should something similar to what is shown below.
Set somewhat additional options you want under the Options box and at another time choose Ok. The new ODBC Data Source elect display on the User DSN serving-boy of the ODBC Data Source Administrator considered in the state of shown below.
able
Choose Ok to conclusion the ODBC Data Source Administrator dialog box.
Now Create Remote Views from inside your VFP Project. You will cause one View for each table that you had in your origin VFP Project. Ensure that the view names match the names of the tables that you had in your eccentric person VFP database. The remote views fust get to your Advantage Database Server ~ means of means of the ODBC connection you created earlier in step 3. To cause a remote view in VFP, fulfil the following action:
Select the Data Tab in your VFP Project and select the Remote Views item.
Select the New button. The Select Connection or Data Source dialog box displays. Select Available Data Sources at the sailing craft part of the dialog box. All the facts sources that you defined in Control panel will list. Select
Select the given conditions source that you created with the Advantage Driver and soon afterward choose Ok. The Open dialog box lists all available tables that you can select. Notice that the View Designer is besides open. Select each table in due chance to add it to the View Designer. Choose Close at the time you are done selecting the desired repast.
Complete the design of your sequestered view as you would in of the sight FoxPro and Save it.
Repeat this series of measures to create views to represent eddish. of the tables you had in your VFP Project.
Now affix the forms, programs, classes that you had in your commencement project into the new project. Make unerring you add all necessary files.
Now cause to ply and test your program. You should determine an issue that your program runs unchanged in contact with the Advantage Database Server.
Now collect together your new application to .exe or .app and at that time run the compiled file directly from Windows. Again, you should obtain that your program should not breed any errors as a result of the change in database access method.
Conclusion:
The push forward briefly outlines in this article allows VFP putting into practice developers to offer a Client/Server translation of their application with minimal changes in existing code base. This can enable VFP developers to pr~ the much desired increased security, permanence, increased storage and increased application reliableness. Another immediate benefit is the talent of Visual FoxPro developers to essay flexibility in application pricing between a banner (pure fox) version and an up ascend Client/Server (enterprise) solution based adhering Advantage. The approach describes in this thing will certainly not deliver the fastest applications viewed like Advantage allows you to get at its data using Cursor Adapters and SQL Pass Through technology if it were not that it is certainly the quickest march to test drive Advantage Database Server. There are multiplied more benefits that can be itemized in this, but we shall leave those with a view to another article that shortly follow this undivided.
No comments:
Post a Comment