Solved

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

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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…
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…

832 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