Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mom and Pop
Message
From
23/01/2004 18:58:37
 
 
To
23/01/2004 16:44:00
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Title:
Miscellaneous
Thread ID:
00868956
Message ID:
00870181
Views:
16
Walter,

First, I don't see OO and relational as mutually exclusive.

Second, with a bit of creativity, one can fairly easily write generic functions in C# (or VB.NET), using existing ADO.NET capabilities, to do something similar to what you're describing.

As an example, while there's an equivalent to SEEK (just define a primary key for a data table and then do an ADO.NET FIND) and there's an equivalent to FILTER and SORT, there isn't a LOCATE (at least not that I'm aware)...however, one can do something like this (I'm typing this as an example)...

DataRow DrLookup = LocateRow("Kevin","FirstName",dtEmployees);
if(DrLookup!=null)
// found
else
// not found


private DataRow LocateRow(string cText,string cColumnName,DataTable dtSearch)
{
DataRow DrReturn =null;
for(int iRowCtr=0;iRowCtr if(dtSearch.Rows[iRowCtr][cColumnName].ToString()==cText)
{
DrReturn = dtSearch.Rows[iRowCtr];
break;
}
return DrReturn;
}


Now, this is still pretty basic, but you could extend this, like adding an optional parameter for where to start, whether to do an exact match or a substring search, etc.

Bottom line is that one can put together a set of functions in ADO.NET to handle the type of data munging that we've all done in VFP for years.

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform