[dba-VB] Type Is Not Defined

ACTEBS actebs at actebs.com.au
Tue Dec 7 21:18:32 CST 2010


Hi Everyone,

 

This is my first attempt at a class, so don't laugh. I am doing this via a
tutorial, and keep getting:

 

Type 'CustomerDataSetSchema' Is Not Defined.

 

I can't understand why this is throwing this error and hope someone can shed
some light on it. The code is below:

 

Imports System.Data

Imports System.Data.OleDb

 

Public Class DataSetConfiguration

'Private Const CONNECTION_STRING As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program
Files\MicrosoftVisual Studio 8\Crystal
Reports\Samples\En\Database\xtreme.mdb"

Private Const QUERY_STRING As String = "SELECT * FROM tblMainData"

Private Const DATATABLE_NAME As String = "tblMainData"

'Bloew is for use within a website

'Private Const DIRECTORY_FILE_PATH As String =
"C:\WebSites\VB_Web_Data_DataSets\"

Public Shared ReadOnly Property CustomerDataSet() As DataSet

Get

Dim myDataSet As CustomerDataSetSchema = New CustomerDataSetSchema()

Dim myOleDbConnection As OleDbConnection = New
OleDbConnection(GetDestConnectionString) '(CONNECTION_STRING)

Dim myOleDbDataAdapter As OleDbDataAdapter = New
OleDbDataAdapter(QUERY_STRING, myOleDbConnection)

 

myOleDbDataAdapter.Fill(myDataSet, DATATABLE_NAME)

Return myDataSet

 

End Get

End Property

 

End Class

 

Many Thanks

 

Vlad

 

 

 

 






More information about the dba-VB mailing list