all groups > dotnet academic > february 2004 >
You're in the

dotnet academic

group:

Connecting to Access Database


Connecting to Access Database John Dougherty
2/19/2004 8:11:08 AM
dotnet academic:
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)

I am using the Visual Studio.NET 2003 Academic version

Any ideas on this

- Thanks

Re: Connecting to Access Database Peter van der Goes
2/19/2004 10:48:12 AM

[quoted text, click to view]
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]

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]

Re: Connecting to Access Database John Dougherty
2/19/2004 9:51:09 PM
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]
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]

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]


Re: Connecting to Access Database Peter van der Goes
2/20/2004 6:07:51 AM

[quoted text, click to view]
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!
[quoted text, click to view]
Thanks for closing the loop, John.
First of all, "experienced" is just a description for somebody who has made
more mistakes that you have, IMHO :-) (I add to my experience on a daily
basis)
Second, glad you stopped in to ask, and that the issue is resolved.

--
Peter [MVP Academic]

AddThis Social Bookmark Button