473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Error trying to connect to Access DB in VB.Net

I am writing a VB.NEt application in Visual Studio 2005 that will
automate an Access database. When I try the following

Dim oAccess as Access.Application

I get this error: "Type 'Access.Application' is not defined".

I don't know if I am missing a reference or not. Could someone please
show me the correct way.

I already have the following references in my app:
Microsoft Access 11.0 Obj Library
Microsoft ActiveX Data Objects 2.5 Library
Microsoft DAO 3.6 Obj Library
Microsoft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3

Thanks

Sep 12 '06 #1
2 3088
Unfortunately I could not replicate this error. Does the error occur
when you build or during runtime? If it builds have you tried stepping
through the code to pinpoint the problem line? Any extra info might
help find the problem. Also, to create an intance of the
Access.Application you need to throw in the "New" keyword. i.e. Dim
oAccess as New Access.Application. Also, what exactly are you trying to
automate? You may not even need to create the Access.Application
object.

Thanks,

Seth

Christie wrote:
I am writing a VB.NEt application in Visual Studio 2005 that will
automate an Access database. When I try the following

Dim oAccess as Access.Application

I get this error: "Type 'Access.Application' is not defined".

I don't know if I am missing a reference or not. Could someone please
show me the correct way.

I already have the following references in my app:
Microsoft Access 11.0 Obj Library
Microsoft ActiveX Data Objects 2.5 Library
Microsoft DAO 3.6 Obj Library
Microsoft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3

Thanks
Sep 12 '06 #2
Seth..thanks you are right..I did not need to create the
Access.Application object..used an ADODB connectin instead...

rowe_newsgroups wrote:
Unfortunately I could not replicate this error. Does the error occur
when you build or during runtime? If it builds have you tried stepping
through the code to pinpoint the problem line? Any extra info might
help find the problem. Also, to create an intance of the
Access.Application you need to throw in the "New" keyword. i.e. Dim
oAccess as New Access.Application. Also, what exactly are you trying to
automate? You may not even need to create the Access.Application
object.

Thanks,

Seth

Christie wrote:
I am writing a VB.NEt application in Visual Studio 2005 that will
automate an Access database. When I try the following

Dim oAccess as Access.Application

I get this error: "Type 'Access.Application' is not defined".

I don't know if I am missing a reference or not. Could someone please
show me the correct way.

I already have the following references in my app:
Microsoft Access 11.0 Obj Library
Microsoft ActiveX Data Objects 2.5 Library
Microsoft DAO 3.6 Obj Library
Microsoft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3

Thanks
Sep 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jani Jalkala | last post by:
I have PHP 4.3.7 running on my client's Windows 2003 server. The same computer also runs SQL Server and I am trying to connect from PHP to a database. This fails, so I would like to track down the...
22
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
0
by: Figmo | last post by:
I have MySQL 4 running on a Win2K3 Server. I can connect to it from MySQL Control Center running on a client PC on our network. But I cannot connect to it from the outside world. Get the "can't...
7
by: kosta | last post by:
hello! one of my forms communicates with a database, and is supposed to add a row to a table using an Insert statement... however, I get a 'oledb - syntax error' exception... I have double...
2
by: arsisthesis | last post by:
Hi all, I have a curious problem with the ERROR 1044 and 1045: -system: OS X 10.4.3 (bash shell) -bash schell prompt: /~ kssun$ -I have set passwd to 'kssun' -I set path:...
12
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I...
2
by: Jim | last post by:
Hello everyone, This is my first time posting to a Usenet group, so please excuse any Netiquette errors I may have in my post. I have used ASP.NET before using C#, but never VB, so I'm trying...
8
by: Kjell Pettersen | last post by:
Hello! I have installed PHP and MySql 5.0 on Win XP. Database created ok. Installation ok. PHP scripts runs ok. But when I am trying some mysql calls in the script I get an "Error 500" from...
0
by: Yoav | last post by:
Hello, I have been trying to enter SQL statmenbts to DB2 control center command line. I saw that user "Thames" wrote to you: > I have to repost my question for help. > > Yesterday I set up two...
7
by: samalphins | last post by:
I have very strange error mysqldump: Got error: 1045: Access denied for user ''@'localhost' (using p assword: YES) when trying to connect I have installed mysql freshly with blank password...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.