Question Type 'OleDbConnection' is not defined

ravi_dangi

New member
Joined
Aug 31, 2010
Messages
1
Programming Experience
Beginner
i got this error Type 'OleDbConnection' is not defined

my code is:-
Imports System.Data.OleDb
Public Class View2
Dim mycn As OleDbConnection = New OleDbConnection(cs)
Dim Command As OleDbCommand
Dim i As Integer
Dim SQLstr As String
Dim dr As OleDbDataReader
Dim ver As Integer


for cs means:-
Module connection_Strings
Public cs As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\usofverification.mdb"
End Module
 
Possibly he doesnt have a reference to System.Data.OleDb DLL.. ?

ravi, delete this project and start another one.. BUT, read the DW2 link in my signature, section "Creating a Simple Data App" - follow that Microsoft tutorial and you'll have your database program up and running in about 10 minutes, posibly less
 
Possibly he doesnt have a reference to System.Data.OleDb DLL.. ?

Hmm it is weird cuz it does not complain about the Import directive.
It must be something else i believe. Otherwise Imports line would be underlined by the intellisense as well. Wouldn't it?
 
Last edited:
Back
Top