Solved

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

Posted on 2003-11-27
6
303 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 100

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 100

Expert Comment

by:mlmcc
ID: 10319469
Split
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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