Possible Applications of Advantage Database Server for Visual FoxPro Developers
Possible Applications of Advantage Database Server for Visual FoxPro Developers
Summary:
In our last article, we described our first contact with Advantage Database Server and how we now use it to enable us offer a Client/Server version of our application. In this article, we will explore other possible areas in which you can effectively apply Advantage Database Server as a Visual FoxPro developer.
Introduction:
The Guys at Advantage Database Server have been pitching Advantage to the Visual FoxPro Community for several years now. Some of us who have embraced Advantage as a data store find that as a native ISAM database engine with close compatibility to Visual FoxPro databases, we can apply Advantage Database server in several ways. Using Advantage Database Server has many advantages to the Visual FoxPro developer. This article is a summary of the different ways we have found that we can apply and utilize Advantage with our Visual FoxPro projects. The sub sections that follow will explore the various ways in which Advantage Database Server can be applied.
The Advantage ODBC Driver for Visual FoxPro:
If you have applications that have been accessing your Visual FoxPro database through ODBC, you will quickly find that a major problem is that the existing VFP ODBC Driver (the last one shipped with VFP 6) will not work with VFP 9 if you use any of the new VFP 9 data types that do not exist in VFP 6. The Advantage ODBC Driver is completely compatible with VFP 9.
Before you can use the Advantage ODBC Driver, you must install Advantage Database Server or Advantage Local Server the ODBC Driver always tries to link to an Advantage Database Server instance. Luckily for us, the guys at Advantage were very helpful, picking a quick interest in us from the very first time we downloaded the product. They quickly sent us keys to work with a trial version. As soon as the product was installed, we used DBCConvert.Prg utility freely supplied by Advantage to create an Advantage Data Dictionary (.add) an Advantage version of the VFP .DBC file we were using. The database conversion utility creates the .add file leaving your .dbc file unchanged so that your existing VFP app will keep using the VFP Database through the .dbc file while any other clients (including our Crystal Reports) can get at the VFP Database through our Advantage Data Dictionary (.add) file.
These clients can include any software that consumes VFP data by means of ODBC. In our case, these included applications written in VB 6 that were integrated with our VFP Project these used the VFP data by means of ODBC while our VFP application was still on the VFP 6 Code base. For the time being, the problem of unfettered access to our VFP data was resolved, albeit temporarily since the version of Advantage we were using was a trial version with a fixed expiry date. If you want to try out the Advantage ODBC Driver, follow these steps:
Ensure that you have either Advantage Database Server (ADS) or Advantage Local Server (ALS) with a valid key and the ODBC Driver (adsodbc.exe) installer packages downloaded from the Advantage Web Site (http://devzone.advantagedatabase.com/dz/content.aspx?key=20)
Install your Advantage Database Server to a windows Server somewhere on your network (or if you want to install a local version on your XP or Vista, this is also possible). In our case, we installed our Software on a computer running Windows 7.
Double-click the file adswin_x86_32 (this is 32-bit ADS. The 64 bit ads is the same but ends with 64). Follow the instructions of the installer to have ADS installed. You will find that the installer runs fairly quickly.
Now double-click the file adsodbc.exe to install your ODBC driver. The ODBC Driver will prompt you for an instance of ADS. Point to your instance of ADS. Even though the ADS documentation says that the file DBCConvert.Prg will be installed when you install the ODBC Driver, we found that it is installed when you install the Advantage OLE DB Driver, not the ODBC Driver. The OLE DB Driver is named oledb.exe. The DBCConvert.Prg is installed in the same folder where the OLE DB driver is installed to. This utility program is written in Visual FoxPro and you will need to run it from within VFP. With these files installed, you are now ready to convert your VFP database (.dbc) file.
Start VFP. Ensure that the VFP .dbc file you want to convert is closed and is not in use either through a Client program or through the VFP IDE.
In the VFP Command window, you may now type DO DBCConvert.Prg. If V FP returns an error message saying that the file does not exist, then you will either have to copy the file DBCConvert.Prg to the VFP Program folder or you will have to use SET DEFAULT/SET PATH so that VFP will search for and find the file. The Open dialog box displays, prompting you to open the VFP Database you want to convert
Select the required database file from the Open dialog box and then choose Ok. The utility begins generating the new .add file. The file has the same name as your Visual FoxPro database but with the .add file name extension. The .add file is created in the same folder where your .dbc file is located. You will also find the Advantage tables (.adt) files that report the results of the upgrade including FieldUpgradeResults.adt, TableUpgradeResults.adt, RelationsUpgradeResults.adt, ViewUpgradeResults.adt.
You can now create an ODBC Connection in Control Panel by means of the ODBC Administrator using the Advantage ODBC Driver.
You can now make any client applications you write consume your VFP Data using the usual ODBC Connection Information. For example, when you create connection strings in Visual Basic, you can use syntax like strConn = "DSN=MYODBCCONN"' and then pass this to your Ado data Connection Object.
Offering a Client-Server Version of your application
Most Visual FoxPro developers are usually accustomed to building complete data management applications (program and database storage) using Visual FoxPro. However, the rigor required of today's enterprise applications often demand increased storage, strong security, performance and compliance with industry standards. Advantage Database Server can be a natural choice as a Client-Server database engine for Visual FoxPro developers. To begin, with, Advantage offers extensive support Visual FoxPro table formats and offers tools to access that data. But most compelling is the fact that ADS is also a fast ISAM Remote Client-Server Database Engine.
The objective would be to run your existing Visual FoxPro applications written for a Visual FoxPro database unchanged against an ADS Data Store with little or no code re-writes. You would have to create an ADS Database with the same name and tables as your VFP Database and then use remote views to access this data. Each view in your ADS would have a name that corresponds to a table in your VFP database. For a detailed description of how you can use VFP in this manner, see our article Test Driving the Advantage'.
When you use Remote Views with ODBC, you can even reuse your old Visual FoxPro database by simply pointing the ODBC connection to it. Since VFP is such a great data store, what are the benefits you get by using Advantage as a data store instead? One clear benefit is that you will at least rid your application of the perennial problem of database and table corruption so prevalent with File-Server databases such as Visual FoxPro. Secondly you now have a client/server application that could potentially scale to any size. Third, you deliver the benefits of increased storage capacity and data security to your clients. Unlike VFP, you could apply Login information to your Advantage Database Server. Fourth, you put your data in a format that is easily accessible by other xBASE tools as well as non xBASE tools such as Visual Studio .Net/Visual Studio 2005/Visual Studio 2008.
VFP provides other means to enable you build VFP applications that run against Advantage Database server. For example, you could use Cursor Adapters or SQL Pass Through (SPT) technology. However, if you need to get existing applications running quickly with minimal code amendments, Remote Views is the way to go.
Application Convergence and Migration:
Since Microsoft's announcement of no VFP 10, any VFP developer worth his salt will be concerned with how to stay in business. How the VFP language evolves or whether it even survives will remain to be seen, but every VFP developer must decide on a way forward for their own portfolio of VFP applications. Advantage Database Server is also helping us in this respect. We are able to keep using and deploying our existing VFP applications while getting at the Visual FoxPro Database through Advantage from Visual Web Developer 2008.
From Visual Web Developer 2008, you can get at your data by using the Advantage Ole db Provider for .Net which connects through the Advantage Data Dictionary file (.add). in this way, we are rewriting (migrating) our applications while ensuring that both the existing windows based VFP application and the new web based version done with Visual Web Developer 2008 use the same database (convergence). This approach allows us to remain in business by selling our existing Windows applications and even enhancing it in VFP while doing a new version in another language. The existing VFP Database will eventually be converted to an Advantage Database so that the existing VFP app will be carried forward as a Windows version of the system while the new version done on Visual Web Developer will be marketed as a web based version.
Conclusion:
As a VFP developer., Advantage Database Server helps you in many ways. Most especially, you will be able to stay in business by selling various versions of your existing VFP apps and even reaching for an upscale version. You will also get an opportunity to develop new versions without breaking compatibility with existing applications. Reach out for unlimited opportunities.gain the true database advantage for Visual FoxPro.
Fingerprint Reader for Data Security Recovery From Anorexia Is Doable MS Recovery Tool Removal Tutorial - How to Get Rid Of MS Recovery Tool Information Security and Payment Card Rules: Protecting Patient Payment Data and Complying with PCI - Webinar By GlobalCompliancePanel Resolving Problems in MDF Due To Database Inconsistency and Invalid File Header Quick recovery has Jets' Sanchez confident about minicamp return Offline Data Entry and Data Conversion Breast Augmentation Recovery: The First Week Data Recovery, Locate, recover and restore Vriti infocom 100 % fraud company: Raliance data card Say No to the Status Quo: Data Center Relocation Benefits What are data rooms useful for? After Logical & Physical Hard drive Lost Data Recovery
Possible Applications of Advantage Database Server for Visual FoxPro Developers Kista