473,498 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't Get Database To Open

I am trying to do my first database app in VB. I am using the
following code from Mastering Visual Basic 6.

When I start the project, the common dialog to open the database comes
up and I select the Northwind database. If I insert a test line of
code, the app will print the name and location of the database in one
of the text areas.

However, the app will work no further than that. If I try to access
the database name as DB.Name I get an error so apparently the database
has not been opened.

Can anyone point out what is wrong with the code? It is straight from
the disk that came with the book?

Thanks,
Bill.
Nov 13 '05 #1
1 1611
There is no following code.

First question, though: Do you have all the Service Packs to VB6? VB6 was
released with support for Jet 3.5x databases (the Jet that came with Access
97) , and later versions of Access use Jet 4.0, so there is some possibility
of incompatibility. This issue is addressed in Knowledge Base article
238401. It may, of course, not be the problem you have encountered.

As I recall, the VB6 documentation emphasized ActiveX Data Objects (ADO) for
I/O, and, in fact, led many to believe that Data Access Objects (DAO) was no
longer supported. In fact, DAO was still supported. The "classic ADO" used
in VB6 was another of Microsoft's "dead ends" in "access methods of choice
for the foreseeable future" -- it has already, long since, been superceded
by ADO.NET which it built on a different object model. In new releases of
Microsoft Products, "Classic ADO" is now supported in only in new releases
in Office.

Far more _Access_ developers use DAO than ADO.

And, a VB newsgroup -- one of the microsoft.public... newsgroups available
at news.microsoft.com or comp.lang.basic.visual.misc in USENET -- would be a
better place to discuss using Jet databases with VB than this one. Although
even Microsoft does not always observe the distinction, Access is a UI and
development tool that installs Jet by default, but can be used with any ODBC
compliant database, or any that has an ADODB provider. But, it is easy to be
misled by the documentation which refers to Access databases when it means
Jet databases.

Larry Linson
Microsoft Access MVP

"Database Newbie" <fixer@yahoo.,com> wrote in message
news:fc********************************@4ax.com...
I am trying to do my first database app in VB. I am using the
following code from Mastering Visual Basic 6.

When I start the project, the common dialog to open the database comes
up and I select the Northwind database. If I insert a test line of
code, the app will print the name and location of the database in one
of the text areas.

However, the app will work no further than that. If I try to access
the database name as DB.Name I get an error so apparently the database
has not been opened.

Can anyone point out what is wrong with the code? It is straight from
the disk that came with the book?

Thanks,
Bill.

Nov 13 '05 #2

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

Similar topics

6
34030
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This table includes an image field which contains most of...
46
5937
by: Steve | last post by:
Access97 Database The database is split into a frontend and backend and not connected to any other database. The database has an unbound report with 15 subreports. Some of the subreports include...
10
6016
by: MHenry | last post by:
Hi, We were going merrily along for 6 years using this database to record all client checks that came into our office, including information about what the checks were for. Suddenly, network...
5
4002
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
3
5557
by: Paolo | last post by:
Hi, I am trying to compact and repair my database, however every time I try it comes up a message saying: Table: "TempMSysAccessObject already exists", whenever I try to look for this table I...
4
2454
by: Macca | last post by:
Hi, I have an windows forms application that accesses a SQL database I have a few questions as to connecting to the database. This application will run 24 hours a day. It is a monitoring...
1
1422
by: dkintheuk | last post by:
Hi all, Just had the wierdest thing happen overnight to one of my databases. I have a frontend/backend set up with the front end under development on my machine. I was copying a load of old...
4
12411
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
12
6229
by: Steve | last post by:
I have a database that raises an error when you try to open it and it doesn't open. Trying to open the database with the OpenDatabase method raises the same error. Trying to import any objects...
1
3707
by: Rameel | last post by:
Friends, I'm probably being more critical with VB.Net Windows application. I have Developed VisualStudio 20005 VB.Net Windows application how willl i be able to save a specific record into my...
0
7002
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
7165
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,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.