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>&nbsp;</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)&nbsp;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>&nbsp;</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,&nbsp;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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thinking along those lines, I created a =
new=20
DAO&nbsp;(call it BaseDAO)&nbsp;and did steps 1, 2 &amp; 4 from above. =
Then I=20
created another DAO&nbsp;(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>&nbsp;</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>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>&nbsp;The designer could not be shown =
for this=20
file because none of the classes within it can be designed.&nbsp; The =
designer=20
inspected the following classes in the file: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;ChildDAO --- The base class=20
'LayerDataAccess.BaseDAO' could not be loaded.&nbsp; 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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance for any =
help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>David.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0311_01C4B836.46A5C3F0--

Re: Architectural Question by Earl

Earl
Sat Oct 23 00:30:40 CDT 2004

Eeeeesh. I'm sure you realize that "DAO" refers to legacy Microsoft Data
Access Objects. Not only has using that term scared off all the .Net guys
(hehe, j/k), but is it possible that referencing a class named "DAO" is
creating this problem?


"pantichd" <pantichd@firstenergycorp.com> wrote in message
news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
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.

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.

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:

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.



Re: Architectural Question by Robert

Robert
Sat Oct 23 02:22:02 CDT 2004

Good point.

Keep in mind what you're referring to is commonly known as a DAC, or Data
Access Component. DAO is definately going to throw some people off. No one
wants to help with Access problems :)

Anyway, it's hard to help with just theories & errors, and no code.

--ROBERT


"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:uYsNrFMuEHA.2788@TK2MSFTNGP09.phx.gbl...
> Eeeeesh. I'm sure you realize that "DAO" refers to legacy Microsoft Data
> Access Objects. Not only has using that term scared off all the .Net guys
> (hehe, j/k), but is it possible that referencing a class named "DAO" is
> creating this problem?
>
>
> "pantichd" <pantichd@firstenergycorp.com> wrote in message
> news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
> 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.
>
> 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.
>
> 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:
>
> 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.
>
>



Re: Architectural Question by pantichd

pantichd
Sat Oct 23 19:44:47 CDT 2004

Sorry to hear that my bad choice of terminology might confuse people.

How about if we start over and pretend I didn't call it DAO? I understand
what you're saying about this maybe confusing people but I really doubt that
the NAME I gave the object is what's causing the problem.


"Earl" <brikshoe@newsgroups.nospam> wrote in message
news:uYsNrFMuEHA.2788@TK2MSFTNGP09.phx.gbl...
> Eeeeesh. I'm sure you realize that "DAO" refers to legacy Microsoft Data
> Access Objects. Not only has using that term scared off all the .Net guys
> (hehe, j/k), but is it possible that referencing a class named "DAO" is
> creating this problem?
>
>
> "pantichd" <pantichd@firstenergycorp.com> wrote in message
> news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
> 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.
>
> 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.
>
> 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:
>
> 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.
>
>



Re: Architectural Question by pantichd

pantichd
Sat Oct 23 19:48:51 CDT 2004

I see now how my terminology could confuse people. Sorry about that. My
first foray with MS programming has been .NET. My background is in Java and
I didn't realize that DAO had a special meaning to MS programmers.

I don't understand why you say "just theories & no errors, and no code" If
you look at my original message you'll see that the section beginning with
"When I try to bring up the designer for ChildDAO I get the following
error:" has the exact error I'm getting.

I'll be glad to provide anything else you need if I can get some help.Please
let me know.



"Robert Bouillon" <djwhizzard@hotmail.com> wrote in message
news:OMn$Z%23MuEHA.3788@TK2MSFTNGP09.phx.gbl...
> Good point.
>
> Keep in mind what you're referring to is commonly known as a DAC, or Data
> Access Component. DAO is definately going to throw some people off. No one
> wants to help with Access problems :)
>
> Anyway, it's hard to help with just theories & errors, and no code.
>
> --ROBERT
>
>
> "Earl" <brikshoe@newsgroups.nospam> wrote in message
> news:uYsNrFMuEHA.2788@TK2MSFTNGP09.phx.gbl...
> > Eeeeesh. I'm sure you realize that "DAO" refers to legacy Microsoft Data
> > Access Objects. Not only has using that term scared off all the .Net
guys
> > (hehe, j/k), but is it possible that referencing a class named "DAO" is
> > creating this problem?
> >
> >
> > "pantichd" <pantichd@firstenergycorp.com> wrote in message
> > news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
> > 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.
> >
> > 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.
> >
> > 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:
> >
> > 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.
> >
> >
>
>



Re: Architectural Question by Robert

Robert
Sun Oct 24 02:13:08 CDT 2004

Sorry for not being more specific (and sorry if I came off cocky).

What I need to know is how your ChildDAO class is inheriting BaseDAO. What
namespace are you in? Also, are you using CSC, Visual Studio, or something
else?

--ROBERT

P.S. DAC has been adopted by MS programmers primarily from Microsoft's label
MDAC for it's library of ODBC & OLEDB components.


"pantichd" <pantichd@firstenergycorp.com> wrote in message
news:u9tg8MWuEHA.908@TK2MSFTNGP11.phx.gbl...
> I see now how my terminology could confuse people. Sorry about that. My
> first foray with MS programming has been .NET. My background is in Java
and
> I didn't realize that DAO had a special meaning to MS programmers.
>
> I don't understand why you say "just theories & no errors, and no code" If
> you look at my original message you'll see that the section beginning with
> "When I try to bring up the designer for ChildDAO I get the following
> error:" has the exact error I'm getting.
>
> I'll be glad to provide anything else you need if I can get some
help.Please
> let me know.
>
>
>
> "Robert Bouillon" <djwhizzard@hotmail.com> wrote in message
> news:OMn$Z%23MuEHA.3788@TK2MSFTNGP09.phx.gbl...
> > Good point.
> >
> > Keep in mind what you're referring to is commonly known as a DAC, or
Data
> > Access Component. DAO is definately going to throw some people off. No
one
> > wants to help with Access problems :)
> >
> > Anyway, it's hard to help with just theories & errors, and no code.
> >
> > --ROBERT
> >
> >
> > "Earl" <brikshoe@newsgroups.nospam> wrote in message
> > news:uYsNrFMuEHA.2788@TK2MSFTNGP09.phx.gbl...
> > > Eeeeesh. I'm sure you realize that "DAO" refers to legacy Microsoft
Data
> > > Access Objects. Not only has using that term scared off all the .Net
> guys
> > > (hehe, j/k), but is it possible that referencing a class named "DAO"
is
> > > creating this problem?
> > >
> > >
> > > "pantichd" <pantichd@firstenergycorp.com> wrote in message
> > > news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
> > > 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.
> > >
> > > 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.
> > >
> > > 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:
> > >
> > > 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.
> > >
> > >
> >
> >
>
>



Re: Architectural Question by pantichd

pantichd
Mon Oct 25 07:23:37 CDT 2004

This is a multi-part message in MIME format.

------=_NextPart_000_0033_01C4BA6B.ED1FAE80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Since my original choice of name could apparently be confusing to people =
let me rephrase my problem ...

Basically, I'm trying to extend a Component class object and I cannot =
open the child class in Designer mode. Here are the steps I'm going =
thru...

STEP #1 -- Create a Component Class and drag a database object (creating =
a connection) and table object (creating a data adapter) to the =
Designer.=20
STEP #2 -- Save this new Component class as BaseDAC (see Code Sample A =
below)
STEP #3 -- Create a new blank class file called ChildDAC
STEP #4 -- Add "Inherits BaseDAC" to the generated code for ChildDAC =
(see Code Sample B below)
STEP #5 -- Try to open Designer on ChildDAC object (see error message =
below)


CODE SAMPLE A
Public Class EmployeeDAC
Inherits System.ComponentModel.Component
Private OrderByValue As String
#Region " Component Designer generated code "
. . .
#End Region
Public Property OrderBy() As String
Get
Return OrderByValue
End Get
Set(ByVal Value As String)
If (OrderByValue Is Nothing Or OrderByValue =3D String.Empty) =
Then
OrderByValue =3D " ORDER BY "
End If
OrderByValue =3D OrderByValue & Value
End Set
End Property
. . . =20
End Class

CODE SAMPLE B
Public Class ChildDAC2
Inherits BaseDAC
End Class

ERROR MESSAGE
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
ChildDAC --- The base class 'LayerDataAccess.BaseDAC' could not be =
loaded. Ensure the assembly has been referenced or built if it is part =
of the project.

NOTE: Both the BaseDAC and ChildDAC are in the same project and both =
compiled fine

Thanks in advance for any help.

David.
------=_NextPart_000_0033_01C4BA6B.ED1FAE80
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 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Since my original choice of name could =
apparently=20
be confusing to people let me rephrase my problem ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Basically, I'm trying to extend a =
Component class=20
object and I cannot open the child class in Designer mode. Here are the =
steps=20
I'm going thru...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>STEP #1 -- Create a Component Class and =
drag a=20
database object (creating a connection) and table object (creating a =
data=20
adapter) to the Designer. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>STEP #2 -- Save this new Component =
class as BaseDAC=20
(see Code Sample A below)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>STEP #3 -- Create a new blank class =
file called=20
ChildDAC</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>STEP #4 -- Add "Inherits BaseDAC" to =
the generated=20
code for ChildDAC (see Code Sample B below)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>STEP #5 -- Try to open Designer on =
ChildDAC object=20
(see error message below)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>CODE SAMPLE A</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>Public Class =
EmployeeDAC<BR>&nbsp;&nbsp;&nbsp;=20
Inherits System.ComponentModel.Component<BR>&nbsp;&nbsp;&nbsp; Private =

OrderByValue As String<BR>#Region " Component Designer generated code=20
"<BR>&nbsp; . . .<BR>#End Region</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Public Property OrderBy() As=20
String<BR>&nbsp;&nbsp;&nbsp; =
Get<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Return OrderByValue<BR>&nbsp;&nbsp;&nbsp; End =
Get<BR>&nbsp;&nbsp;&nbsp;=20
Set(ByVal Value As =
String)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If=20
(OrderByValue Is Nothing Or OrderByValue =3D String.Empty)=20
=
Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;=20
OrderByValue =3D " ORDER BY =
"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End=20
If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OrderByValue =3D =
OrderByValue=20
&amp; Value<BR>&nbsp;&nbsp;&nbsp; End Set<BR>End Property</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>. . .&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>End =
Class<BR></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2>CODE SAMPLE B</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV><FONT face=3DArial size=3D2>Public Class =
ChildDAC2<BR>&nbsp;&nbsp;&nbsp;=20
Inherits BaseDAC</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>End Class</FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ERROR MESSAGE</FONT></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;The designer could not be shown =
for this=20
file because none of the classes within it can be designed.&nbsp; The =
designer=20
inspected the following classes in the file:&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;ChildDAC --- The base class=20
'LayerDataAccess.BaseDAC' could not be loaded.&nbsp; Ensure the =
assembly has=20
been referenced or built if it is part of the=20
project.</FONT></DIV></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>NOTE:&nbsp; Both the BaseDAC and =
ChildDAC are in=20
the same project and both&nbsp;compiled fine</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks in advance for any =
help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>David.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0033_01C4BA6B.ED1FAE80--


Re: Architectural Question by pantichd

pantichd
Mon Oct 25 20:40:21 CDT 2004

Robert,

I have another post in this thread that shows the example code of the child
class.

I'm writing VisualBasic using VisualStudio.NET

David


"Robert Bouillon" <djwhizzard@hotmail.com> wrote in message
news:%23KH2DeZuEHA.636@TK2MSFTNGP09.phx.gbl...
> Sorry for not being more specific (and sorry if I came off cocky).
>
> What I need to know is how your ChildDAO class is inheriting BaseDAO. What
> namespace are you in? Also, are you using CSC, Visual Studio, or something
> else?
>
> --ROBERT
>
> P.S. DAC has been adopted by MS programmers primarily from Microsoft's
label
> MDAC for it's library of ODBC & OLEDB components.
>



Re: Architectural Question by pantichd

pantichd
Tue Nov 02 07:18:08 CST 2004

This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C4C0B4.7C76E730
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Problem solved...

Turns out I had to do a build before it could find the base class.=20

This has me puzzled, though. Being a MS-neophyte I just don't understand =
how the compiler knows that the class exists without me doing a build =
but the designer does NOT until I do a build.=20

Can someone explain that to me?

Thanks!
"pantichd" <pantichd@firstenergycorp.com> wrote in message =
news:u9RNPfFuEHA.2980@tk2msftngp13.phx.gbl...
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