Okay, I've just been very dense here!
I was experimenting with a Smart Device app, which of course I now realize doesn't support Access connectivity, so the OleDB objects are not available! As soon as I created a regular Windows application, I do have access to the OleDB objects. Thanks for your help - but it was just my lack of experience in this environment which caused my problems here!
- JRD
----- Peter van der Goes wrote: -----
[quoted text, click to view] "John Dougherty" <anonymous@discussions.microsoft.com> wrote in message
news:1F33409F-4E8A-43AB-9CD8-E0D64A1C6173@microsoft.com...
> I want to programatically connect to an Access database, but my
environment will not allow me to use "System.Data.OleDB..." - OleDB is not
even showing as an available option. I can connect visually to an Access
database via Server Explorer (where "Microsoft Jet 4.0 OLE DB Provider" is
available). I assume a reference or something is missing. I do have
SQLClient available (System.Data.SQLClient).
[quoted text, click to view] >> I am using the Visual Studio.NET 2003 Academic version.
>> Any ideas on this?
>> - Thanks,
>> JRD
Interesting situation.
What kind of project are you developing? I've tried a few different
language/template combinations here and I automatically get a reference to
System.Data (expand the References tag in Solution Explorer) every time.
When I double-click on System.Data to open the Object Browser, I
automatically get Common, Odbc, OleDb, SqlClient and SqlTypes. Are you
saying that System.Data.OleDb does not appear in Object Browser?
Object Browser also reports that all this is located in
Assembly System.Data
D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll
Which I thought was a standard part of the framework.
Please let us know about the project type and how what you see in Object
Browser differs, and we'll go from there.
--
Peter [MVP Academic]