Solved

what is difference between these two......

Posted on 2003-11-27
6
313 Views
Last Modified: 2012-05-04
what is difference between these two
dim cn as connection
or
dim db as database

Help!!!!!
0
Comment
Question by:samarjit_de
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 8

Accepted Solution

by:
SNilsson earned 25 total points
ID: 9833512
In most cases...

Dim db as database
This can refer to a Access database.

Dim cn as connection
This can refer to a ADO connection

Since you dont type it out explicitly the 'connection' could refer to a DAO connection.

Dim cn as ADODB.connection   (this would tell for sure what type it is)

0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 25 total points
ID: 9833979
The difference is in the function they perform.

A database is a file on the computer that is managed by a database program.
    For instance the MS Access sample database NorthWinds.mdb

A connection is a programming object that is used to gain access to a file generally a database but not always.
For VB to open and use a database a connectioin to the database must be established.

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 10319469
Split
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question