This is a multi-part message in MIME format.
------=_NextPart_000_0311_01C4B836.46A5C3F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I'm using a Component Class object to represent a database table. This =
Data Access Object (DAO) has a connection object and data adapter object =
in it along with a bunch of methods that need to be there every time I =
create a new DAO to represent a db table.=20
Instead of having to code that "common" logic for each new class I'd =
like to create a base DAO, put the common logic there and inherit from =
it (instead of System.ComponentModel.Component) for each new DAO.
My current steps for creating a new DAO are:
1) Create a new Component Class object
2) Drag the database from the Server Explorer onto the design pane. This =
creates the connection object to the db.
3) Drag a table from the database in Server Explorer onto the design =
pane. This creates the data adapter object for that table.
4) Create all the common methods in the new DAO
Within an application, each DAO will have the exact same connection =
object so I'd like to include that in the base DAO.
Thinking along those lines, I created a new DAO (call it BaseDAO) and =
did steps 1, 2 & 4 from above. Then I created another DAO (ChildDAO) =
that inherits from the BaseDAO. I was hoping that I would then be able =
to just do step 3 from above for this new DAO.=20
When I try to bring up the designer for ChildDAO I get the following =
error:
The designer could not be shown for this file because none of the =
classes within it can be designed. The designer inspected the following =
classes in the file:=20
ChildDAO --- The base class 'LayerDataAccess.BaseDAO' could not be =
loaded. Ensure the assembly has been referenced or built if it is part =
of the project.
Both the BaseDAO and ChildDAO objects are in the same project. Does =
anyone have any ideas what I'm doing wrong?
Thanks in advance for any help.
David.
------=_NextPart_000_0311_01C4B836.46A5C3F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm using a Component Class object to =
represent a=20
database table. This Data Access Object (DAO) has a connection =
object and=20
data adapter object in it along with a bunch of methods that need to be =
there=20
every time I create a new DAO to represent a db table. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Instead of having to code that "common" =
logic for=20
each new class I'd like to create a base DAO, put the common logic =
there=20
and inherit from it (instead of System.ComponentModel.Component) for =
each new=20
DAO.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>My current steps for creating a new DAO =
are:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1) Create a new Component Class =
object</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2) Drag the database from the Server =
Explorer onto=20
the design pane. This creates the connection object to the =
db.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3) Drag a table from the database in =
Server=20
Explorer onto the design pane. This creates the data adapter object for =
that=20
table.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4) Create all the common methods in the =
new=20
DAO</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Within an application, each DAO will =
have the exact=20
same connection object so I'd like to include that in the base =
DAO.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thinking along those lines, I created a =
new=20
DAO (call it BaseDAO) and did steps 1, 2 & 4 from above. =
Then I=20
created another DAO (ChildDAO) that inherits from the BaseDAO. I =
was hoping=20
that I would then be able to just do step 3 from above for this new DAO. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>When I try to bring up the designer for =
ChildDAO I=20
get the following error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2> The designer could not be shown =
for this=20
file because none of the classes within it can be designed. The =
designer=20
inspected the following classes in the file: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> ChildDAO --- The base class=20
'LayerDataAccess.BaseDAO' could not be loaded. Ensure the =
assembly has=20
been referenced or built if it is part of the=20
project.<BR></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2>Both the BaseDAO and ChildDAO objects =
are in the=20
same project. Does anyone have any ideas what I'm doing =
wrong?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance for any =
help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>David.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0311_01C4B836.46A5C3F0--