Problem importing datasetTableAdapters into Class
Hi,
Recently after installing VS 2008 Professional (plus SP1) I have this problem in some (that's the weird part) Public Classes under App_Code folder:
a) I have a DataSet in the solution named 'CreditDB_DAL' (saved as CreditDB_DAL.xsd), which connects to a SQL 2008 Server Database and contains a number of datasets and respective tableadapters implementing select, update, insert and delete queries
b) I have separate class files also under App_Code, each one interacting with the CreditDB_DALTableadapters by implementing specific rules (validation mostly) prior to updates/insertions/deletions of records. By a general rule there's one class for each table in the dataset
c) Each class begins with a series of statements like:
Imports Microsoft.VisualBasic
Imports CreditDB_DALTableAdapters
Imports ...
The problem is that the 'CreditDB_DALTableAdapters' is no longer recognized by the intellisense when I create a new class (or edit an old one). This prevents the class from recognizing all the table and query definitions (table names, column names, data types) contained int the Dataset.
Before the problem occurred, when typing "Imports CreditDB_DALTableAdapters" the intellisense would allow me to autocomplete the line.
Now, it highlights a syntax error (green underline) and the tooltip error indicates
"the namespace or type specified in the Imports 'CreditDB_DALTableAdapters' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases"
This error began occurring after I installed VS 2008 Professional.
The solution was initially created as a website with MS Visual Web Developer Express Edition. I then edited it with VS 2008 (reduced version available when I installed MS SQL Server 2008). In none of the prior cases I had this problem.
Would appreciate any guidance on this
Last edited by nqsousa; January 21st, 2010 at 01:24 PM..
Reason: adding information about error displayed
|