[quoted text, click to view] "Gilbert Tordeur" <gilbert.tordeur@fr.york.com> wrote in message
news:%23yWaKY1jEHA.2340@TK2MSFTNGP11.phx.gbl...
> Environment : Visual Studio 2003 v 7.1.3088 (French)
> Development of a Windows application with SQL Server 2000
>
> I get the following compile error message in the .xsd module :
> C:\Documents
> and Settings\TORDEUR.FRYORKF\Mes documents\Visual Studio
> Projects\Annuaire\ClasseDsGeneral.vb(117): 'Public ReadOnly Property
> Site()
> As SiteDataTable' et 'Public Overrides Property Site() As
> System.ComponentModel.ISite' ne peuvent pas se surcharger mutuellement,
> car
> seul 'ReadOnly' ou 'WriteOnly' les différencie. 'Shadows' est pris en
> compte
> par défaut.
>
> Translation : C:\Documents and Settings\TORDEUR.FRYORKF\Mes
> documents\Visual
> Studio Projects\Annuaire\ClasseDsGeneral.vb(117): 'Public ReadOnly
> Property
> Site() As SiteDataTable' and 'Public Overrides Property Site() As
> System.ComponentModel.ISite' cannot override each other, because only the
> return types are different. 'Shadows' is taken into account by default.
>
> What does that mean ? What can I do ? I have not this problem with other
> tables, only when I call this one. I have deleted everything and set it
> again : the error comes again. Thank you for your help.
>
In the XSD, change the codegen:typedName of the column Site to something
else by adding a codegen attribute to the xs:element tag for the Site
column, eg
<xs:element name="Site" codegen:typedName="SiteID" codegen:nullValue=""
type="xs:string" minOccurs="0" />
See, in general,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingannotationswithtypeddataset.asp
For how to control all sorts of usefull things about the dataset class
through the XSD.
David