Access automation

D

Dan

I coped the code from http://support.microsoft.com/default.aspx/kb/317114
and followed the directions exactly and I am getting the following error:

Error 1 The type or namespace name 'Access' could not be found (are you
missing a using directive or an assembly
reference?) C:\WindowsApplication1\WindowsApplication1\Form1.cs 75 17 WindowsApplication1

I added the reference and using directives, is there something I am missing?

VS 2005 Academic Edition
Access 2003
 
A

anantsystems

I coped the code fromhttp://support.microsoft.com/default.aspx/kb/317114
and followed the directions exactly and I am getting the following error:

Error 1 The type or namespace name 'Access' could not be found (are you
missing a using directive or an assembly
reference?) C:\WindowsApplication1\WindowsApplication1\Form1.cs 75 17 WindowsApplication1

I added the reference and using directives, is there something I am missing?

VS 2005 Academic Edition
Access 2003


A
 
A

anantsystems

I coped the code fromhttp://support.microsoft.com/default.aspx/kb/317114
and followed the directions exactly and I am getting the following error:

Error 1 The type or namespace name 'Access' could not be found (are you
missing a using directive or an assembly
reference?) C:\WindowsApplication1\WindowsApplication1\Form1.cs 75 17 WindowsApplication1

I added the reference and using directives, is there something I am missing?

VS 2005 Academic Edition
Access 2003

A couple of things:

1. Make sure you reference the folloing object library

Add a reference to the Microsoft Access Object Library. To do this,
follow these steps:
On the Project menu, click Add Reference.
On the COM tab, locate Microsoft Access 11.0 Object Library, and then
click Select. Note that if you have not already done so, it is
recommended that you download and install the Microsoft Office XP
Primary Interop Assemblies (PIAs). For additional information about
Office XP PIAs, see the Microsoft Knowledge Base article - (328912)
INFO: Microsoft Office XP PIAs Are Available for Download.
In the Add References dialog box click OK to accept your selections.
If you receive a prompt to generate wrappers for the libraries that
you selected, click Yes.


2. If it still doesn't work, try to hard code the reference to this
object type:

e.g. Microsoft.Office.Interop.Access.Application oAccess = null;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top