Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindable VFP 6.0 controls to ADO recordsets
Message
 
To
31/05/2001 16:24:02
John White
Micro-Oriented Software Techniques, Inc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00513401
Message ID:
00513415
Views:
19
Hi John,

Other than (possibly) DataClas 2000, I don't know offhand of any commercially available VFP-specific classes which bind to ADO recordset values. Most of the single-value controls (text boxes, check boxes, edit boxes, option buttons, et al) you can bind with the oRecordset.Fields( "MyFieldName" ).Value syntax.

For the multiple-choice controls other than grids (list boxes and combo boxes), I've created some controls that auto-populate an array from an existing recordset and then drive the control from the array. The Requery() of these controls resyncs the recordset, rebuilds the array, and refreshes the control. I also have an ADO handler class, based on Custom, that maintains a single recordset and all its functionality (connection, command object, navigation, updating, and so forth).

Others here will most probably come up with much smoother, more elegant means of doing this, but these seem to work okay for me. I'll be happy to share them with you if you'd like. Currently, they're designed under the Visual MaxFrame framework, but it wouldn't take much to re-inherit them under any methodology you're currently using.

HTH.

>Does anyone know of a listing of what controls are bindable to ADO recordsets, and the proper syntax. I know grids are not, and the MSDATA Grid is working just ducky. Using the FOXCOM.dll method rsToCursor() to convert to Recordsets to Fox cursors is SLOOOOOW, it took 12 seconds to convert a recordset of 3000 records, on my Pentium 933 with 256 megs of RAM connected to SQL Server 2000, when the query of 500,000 took less than 1 second. The FOXCOM conversion is slowing the down the whole UI, I can't blame SQL server for this one. I'd like to bind all controls, listboxes, combos, checkboxes directly to ADO. Microsoft in usual fashion has nothing, I've tried Wiki, VFUG, nothing.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Reply
Map
View

Click here to load this message in the networking platform