Linda,
>I am still struggling to figure out the best way to cycle through a table when I need to look at just certain fields, use some values to look up other values and create an export text file. I'm feeling a bit dense. I haven't figured out how to just go to the next record using the entity object. The table doesn't really have a primary key and I wouldn't want to use it if it did, since I have to look at every record and wouldn't know the key without scanning t he table. I'm currently using a reader but it is more verbose and each field has to be converted to a type. I can make it work but it's a bit of a nuisance. Any suggestions for the best way to do this?
Paul's answer is absolutely correct (as usual <s>). In addition, if you are using MM .NET 2.3, you can use the new GetEntityList() or CreateEntityList() methods to return a list of strongly typed entities that you can cycle through. The MM .NET Dev Guide topic "Understanding Business Entity Objects" has a section "Creating Strongly Typed Lists of Entity Objects" that has this code sample:
List<OrdersEntity> EntityList = this.CreateEntityList<OrdersEntity>();
foreach (OrdersEntity Order in EntityList)
{
CustomerID = Order.CustomerID;
}
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com