Ciao a tutti,
stò facendo le mie prime prove con gridView e DataSource ma mi ritorna sempre un errore
A field or property with the name 'titolo' was not found on the selected data source.
Stò usando un DB mysql5 installato in locale con questo schema
CREATE TABLE `news` (
`id_news` int(11) NOT NULL auto_increment,
` titolo` varchar(255) NOT NULL default '',
`abstract` text,
`testo` text NOT NULL,
`data_inserimento` datetime NOT NULL,
PRIMARY KEY (`id_news`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
mentre nella pagina asp.net ho messo un semplice dataSource e un gridView
<asp:Gridview runat="server" ID="dgNews" DataSourceID="MySqlSource">
<Columns>
<asp:BoundField DataField="titolo" HeaderText="Titolos" />
<asp:BoundField DataField="data_inserimento" HeaderText="Data Inserimento" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="MySqlSource" runat="server" ConnectionString="<%$ ConnectionStrings:LocalMySql %>" ProviderName="<%$ ConnectionStrings:LocalMySql.ProviderName %>" SelectCommand="SELECT * FROM news"></asp:SqlDataSource>
Perchè mi dice che non trova il campo titolo?
thx!