SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old August 11th, 2003, 10:12 AM
slconsult slconsult is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Essex, ON
Posts: 18 slconsult User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 35 sec
Reputation Power: 0
Question ADODB.Connection not defined

Can someone please help me? I am trying to set up my database connection and I keep getting the blue underline telling me that my ADODB.Connection is not defined. Below is my code preamble to make the connection (or so I thought). Just for info, after my code I have all of my Select Case code after these declarations.

Public Class Form1
Inherits System.Windows.Forms.Form

Windows Form Designer generated code

Public Class DATABASE_CONNECTIONS

Private M_CONNECTION As New ADODB.Connection()
Private M_DATABASE_NAME As String
Private M_SERVER As String

Public Sub New(ByVal DATABASE_NAME As String, ByVal SERVER As String)
M_DATABASE_NAME = DATABASE_NAME
M_SERVER = SERVER
M_CONNECTION = New ADODB.Connection()




Thanks in advance.

Reply With Quote
  #2  
Old August 11th, 2003, 10:53 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 7
you need to add a reference to ActiveX Data Objects 2.x (your version will vary, probably 2.7).

since this is .net to add a reference:
Project > Add Reference > COM tab and find the library.

it is also bad practice to have your variables in all upper case. that is generally only used for constants.
__________________
Programmer's Corner

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > ADODB.Connection not defined


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway