|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > ADODB.Connection not defined |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|