Hello:
All you have to do in this case is derive from Component (or
MarshalByValueComponent) and then use that. The reason that the SqlCommands
don't show up is because the adapter will have the reference, so they don't
need to be stored on the class level, they just need to be assigned to
(which is what the designer takes care of).
Thanks for the answer.
Not sure about this, i'm going to try to explait what i want to
do a little better :)
Ok, i'm the author of the Firebird ADO.NET provider and i'm trying to
add Design Time support to the data adapter implementation, i have a
Designer for the Data Adapter classclass, in one method of the Designer
i want to initialize the SelectCommand, InsertCommand, UpdateCommand and
DeleteCommand properties of the data adapter, i'm doing something
like this (in the method handler of one of the designer verbs supported
by the designer):
IDesignerHost host =
(IDesignerHost)this.Component.Site.GetService(type of(IDesignerHost));
DesignerTransaction transaction =
host.CreateTransaction("GenerateTypeDataSet");
if (((FbDataAdapter)this.Component).SelectCommand == null)
{ ((FbDataAdapter)this.Component).SelectCommand =
host.CreateComponent(typeof(FbCommand)) as FbCommand;
}
transaction.Commit();
Ok with this when i drop a FbDataAdapter into a form the FbCommand
component and i run the designer option that initializes the adapter the
Component assigned to the SelectCommand property is visible at design
time and and i want to hide it.
( The SqlCommand has a DesignTimeVisible property but i'm not sure
what is what it does .... and i f that can be what i need to implement
and how :) )
--
Best regards
Carlos Guzmán Álvarez
Vigo-Spain