Version 2.22 (VFP 9.0)
Yes, it's back.. But a new and improved version. Faster, Cleaner, and Extendable. I took a little time and rewrote the entire routine to allow the developers to add their own data drivers and cleaned up the code so I can better manage it (the first version became unmanageable.)
Query is a single function that allow you to manipulate various types of lists of data sources (Collections, Arrays, Cursor, XML data, delimited strings, and etc) with the standard SQL statements.
Use a standard SQL statement to filter, sort, combine data sources, and then convert to a different data source. Also, with the Update, Insert, and Delete SQL statement, you can manage the lists as if they were cursors.
Download it here.
Select from a Collection for items starting with "M" and output the sorted results to an Array.
TEXT TO lcSQL NOSHOW TEXTMERGE PRETEXT 15
SELECT * FROM Collection oColl
WHERE left(name,1)="M"
ORDER BY item
INTO ARRAY laDest
ENDTEXT
lcnt = Query( lcSQL )
Get a list of files from a folder (and child folders) that have been modified after a specific date and place thier names (and paths) into a delimited string.
lcStr = ""
TEXT TO lcSQL NOSHOW TEXTMERGE PRETEXT 15
SELECT padr(alltrim(Path)+alltrim(Name),100) AS FileName
FROM File ".\*.txt" Recur
WHERE Modified >= {01/01/2009} and Archived
ORDER BY FileName
INTO String lcStr (comma,crlf}
ENDTEXT
lcnt = Query( lcSQL )
Update the Archived file attribute for a list of files in a delimited string (lcStr).
TEXT TO lcSQL NOSHOW TEXTMERGE PRETEXT 15
UPDATE file ".\*.*"
SET Archived = .F.
WHERE PADR(ALLTRIM(Path)+ALLTRIM(Name),100)
IN (select * from String lcStr {comma,crlf})
ENDTEXT
lcnt = query( lcSQL )
Load a ListBox from a INI section. (These's a ComboBox version too.)
TEXT TO lcSQL NOSHOW TEXTMERGE PRETEXT 15
SELECT iniName, iniValue FROM INI ".\Test.INI"
WHERE iniSection="Main" INTO ListBox oList
ENDTEXT
lcCnt = Query( lcSQL )
Delete a item from a INI file.
lcCnt = Query([DELETE FROM Ini ".\Test.INI" WHERE iniSection="Main" and iniName="SomeThing"] )
If you are interested in see this in action, you can download a copy here and run the Demo.prg program.
| 2.00.0049 - | Release of version 2.0 |
| 2.00.0056 - | Minor fixes |
| 2.00.0129 - | Minor fixes and more drivers |
| 2.00.0165 - | New driver |
| 2.10.0207 - | Simplified driver interface, and now over 30 drivers |
| 2.10.0208 - | Loaded current drivers into the APP, but it still will look for addition external drivers in the Data_Drivers folder. This make the tool better for distribution; the drivers do not have to be distributed in the data_drivers folder. |
| 2.10.0249 - | More drivers - 41 to count |
| 2.11.0392 - | Minor fixes and File.prg is now optionally recursive. |
| 2.11.0475 - | A few adjustments to some of the drivers. |
| 2.22.0843 - | More drivers. |
In list below, you can now download individual drivers as they become available or updated.
The driver may have icons to indicate wheither the driver is New (
), recently Updated (
), or currently under development (
). Updated and New icon will disappear when new releases of the Query tool are uploaded.
It was brought to my attention that the individual driver links were all broken. Some browser (or settings) were preventing the download of actual .PRG files. I have converted them to .ZIP format to fix the problem. Sorry. GLR
- Query.app (Internal)
- Driver Template: Base Query driver template. Used to create new drivers.
- Driver: Read and Write to Query Data Drivers informaton.
- General Visual FoxPro
- Variables
- Array: Read and Write to Arrays.
- Collection: Read and Write Collections
- Keyword: Read List of VFP Keywords.
- String: Read and Write Delimited String.

- Variable: Write output to a single variable.
- Set: Manage VFP SET commands.
- Objects
- Class Library: Read Only from Class Library using AVCXClass() function.
- ComboBox: Read and Write ComboBox items.

- ListBox: Read and Write ListBox items.
- PEM: Read Object's PEM information.
- Database
- Database: Read and Write to DBC Database Container
- Cursor: Read and Write to Standard VFP Cursors
- Field: Read and Write table structure
- IndexTag: Read and Write Table Index Tag information.
- ODBC: Read ODBC Data Source Information
- SQL: Read from SQL source via Connection String.
- Table: Read and Write standard Tables.
- Files and Folders
- File: Select,update,create,delete files for a folder.
li>
- CSV: Read and Write CSV files
- XML: Read and Write XML Files
- External: Read and Write other file types (Excel,CSV,SDF,FoxBase,Fox2XDelimited)
- Computer Environment
- Drive: Read and Write to Hard Drive drives
- Environment: Read Only System Environment Variables
- Event Log: Read Only System Event Logs.
- File User: Read a list of filename and owners from network.
- Graphic: Read Graphic / Monitor matrix
- INI: Read and Write to INI files.

- Locale: Read System Locale information

- Network Resource: Read List using NetResource
- Printer: Read List of printers.
- System Processes: Read List of System Processes.
- Registry: Read and Write Registry Entries.
- Screen: Output various destination line Browse window, reports, etc.
- Window Services: Get a list of current windows services.

- Task: Read and Write System Tasks.
- User Groups: Read Security Group for Users.
- Users: Read list of logged in users.
- DSN: Reads registried DSN drivers.
- Time Zone: Read Time Zone information.
- Internet
- FTP: Read and Write from a FTP Site.
- RSS: Read RSS feed.

- Miscellanious
- Excel: Read and write from Excel.
- Outlook Contact List: Manage Outlook Contact list.

- Spell Check: Spell Check a string.
- Zip: Manage Zip files via vfpCompression.fll.
- Update Coming
- Simaphore: Manage windows semiphore.

- Active Directory: Manage Active Directory.

- AJAX: Read and write via an AJAX connection.

- ClipBoard: Manage windows Clipboard.

- DynaZip: Manage zip files using DynaZip.

- Font: Manage Windows Fonts.

- EmailCDO: Manage EMail via CDO.

- Message: Manage Message Queue.

- Outlook: Manage Outlook email.

- PrintJob: Manage windows Printer Spooler.

- WebService: Access Web Services.

- Window: Read windows Rectangle data.

- WMI: Generic WMI access.

- CursorAdapter: Access data source using CursorAdapter.

- Fax: Write to fax number.

- PDF: General result to a PDF file.

I am looking for any drivers you may have developed for the Query tool. If you have one or more or even an idea for one, please contact me at Query@GLRsoftware.com. Thank you. Greg