green_bean:
My DAL is called MyTestDAL and my data table is MyTestDB. Would my dataadapter class then be MyTestDAL.MyTestDBTableAdapter?
If I understand you right, your XSD file in the App_Code folder is called MyTestDAL.XSD and your MySQL database table - the table, not the database - is called MyTestDB?
In which case
NorthwindTableAdapters.ProductsTableAdapter productsAdapter = new NorthwindTableAdapters.ProductsTableAdapter();
Northwind.ProductsDataTable products;
becomes
MyTestDALTableAdapters.MyTestDBTableAdapter myTestDBAdapter = new MyTestDALTableAdapters.MyTestDBTableAdapter();
MyTestDAL.MyTestDBDataTable myTestDB;
So what is the .xsd file in the App_Code called?
If it is called "foo.xsd" then your BLL code should include :-
using FooTableAdapters; // note Adapters with an s on the end, not Adapter.
Here is an example where xsd file is Foo.xsd, my database table is named EntryClasses, my source file could be called anything but it is EntryClassesBLL.cs ...
using
System;
using lots of other stuff ...
using FooTableAdapters; // note Adapters with an s on the end, not just Adapter.
[System.ComponentModel.DataObject]
public class EntryClassesBLL
{
private EntryClassesTableAdapter _entryClassesAdapter = null;protected EntryClassesTableAdapter Adapter
{
get
{
if (_entryClassesAdapter == null)
_entryClassesAdapter =
new EntryClassesTableAdapter();return _entryClassesAdapter;
}
}
If a post helps to solve your problem, please click the Answer button on that post.
I'm still confused, but now I'm confused on a higher plane.