Greg Reichert Blog

My Blog is mainly about myself and software development in general, but mainly Visual FoxPro.

My Photo
Name:
Location: Memphis, Tennessee, United States

Monday, January 22, 2007

Query

I have just recently posted version 2.0 of my Query tool. What is Query? It allows Visual FoxPro developer use the SQL language to Select, Update, Delete, and Insert into most any form of listed data. Data source like Array, Collection, SQL Server tables, VFP Tables and Cursors, the file system of files, and list goes on. Not only are these data source available, but you add your own data source.

One of the coolest is that when querying a data sources, there can be different types of dasta sources in the same SQL statement. Here is an example of a Query request.



Query([SELECT * from table Customers ] ;
+ [LEFT JOIN SQL Orders CONSTRING lcConStr ON Customers.CustID=Orders.CustID ] ;
+ [ Where City in (Select Exp1 from Collection Cities) ] ;
+ [ ORDER BY CustID ] ;
+ [ INTO XML OBJECT CustOrder.xml ]



Here we are grabbing rowes from the local table of Customer, and joining with a SQL Server table of Orders, and using a collection to filter the result; which is saved to a XML file. How many lines of code would take normally to preform the same act.

You can download the tool from my web site at http://www.GLRsoftware.com/Download.asp#Query.zip

Labels:

0 Comments:

Post a Comment

<< Home