Solved

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

Posted on 2003-11-27
6
298 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now