| Part 2 - Using ADO .NET - Access and OleDB | |||||||||||||||||||||
| Access and ADO .NET make a powerful team! | |||||||||||||||||||||
The first article of this series introduced ADO .NET, Microsoft's new data access object library. This article will show you how to use ADO .NET with Access and VB .NET in several modes: read only and update mode using your own Access database. This week, Part I will explain a read only program and next week, an update program will be shown. ----------------------------------------- About.com also has a database focused site at
databases.about.com. ----------------------------------------- |
|||||||||||||||||||||
For many people, the "beginning" is programming in Office using VBA, so here's the story on that. In the series 'About' VBA, I demonstrated how easy it was to 'instantiate' objects from other environments and use them in a VBA program with an Office application - such as Access! So the first question about ADO .NET might be, "Great! How do I use it in Access?" Unfortunately, it can't be done according to Microsoft. ADO .NET was designed to work with .NET and not COM (the technology used by Office and VBA). Microsoft explains that even if you go through the steps to force Office to recognize ADO .NET, it still doesn't work: Well ... it would have been nice. But stay tuned! Microsoft is just now (May 2003) releasing a new version of Office that allows it to call VB .NET programs. It's currently in beta test, but we'll provide more information when things firm up. But even though you can't use ADO .NET in Access, you certainly can use it with an Access database. Since there's a good chance that you will want to build your own database rather than using the Microsoft Northwind sample, a very simple Access database was constructed containing data about recent About Visual Basic Spotlight articles. Here's what that looks like: Next page >
The OleDbDataReader Object > Page
1,
2,
3,
4,
5,
6 |
|||||||||||||||||||||

