[dba-VB] Type Is Not Defined

Michael Maddison michael at ddisolutions.com.au
Wed Dec 8 16:22:20 CST 2010


The compiler cant find 'CustomerDataSetSchema'.

Is it in another project? Set a ref to the project.

If you don't have the class then you need to get it and it needs to be
in the scope of the calling class, the tutorial should have it.

BTW, the last place I'd be learning .net classes is in a Crystal Reports
tutorial!

 

Cheers

 

Michael

 

From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of ACTEBS
Sent: Wednesday, 8 December 2010 2:19 PM
To: 'dba-vb'
Subject: [dba-VB] Type Is Not Defined

 

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











_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

________________________________

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1170 / Virus Database: 426/3302 - Release Date: 12/07/10




More information about the dba-VB mailing list