问题描述
我数据库里明明有TArea,却出现了这样的错误,很不解,谁来指点下前台:<asp:DataGridid="dgd_roomlist"style="Z-INDEX:101;LEFT:128px;POSITION:absolute;TOP:56px"runat="server"Width="100%"Height="344px"AllowPaging="True"AutoGenerateColumns="False"PageSize="12"><Columns><asp:BoundColumnDataField="rid"ReadOnly="True"HeaderText="房间号"></asp:BoundColumn><asp:BoundColumnDataField="tname"ReadOnly="True"HeaderText="房间类型"></asp:BoundColumn><asp:BoundColumnDataField="tprice"ReadOnly="True"HeaderText="单价"></asp:BoundColumn><asp:BoundColumnDataField="rposition"ReadOnly="True"HeaderText="位置"></asp:BoundColumn><asp:BoundColumnDataField="tarea"ReadOnly="True"HeaderText="面积"></asp:BoundColumn><asp:HyperLinkColumnDataNavigateUrlField="rid"DataNavigateUrlFormatString="cool.aspx?rid={0}"DataTextField="rid"HeaderText="预订"DataTextFormatString="预订"></asp:HyperLinkColumn></Columns></asp:DataGrid>后台:stringstrconn=ConfigurationSettings.AppSettings["dsn"];SqlConnectioncn=newSqlConnection(strconn);SqlDataAdapterda=newSqlDataAdapter("guestroomlist",cn);DataSetds=newDataSet();da.Fill(ds);dgd_roomlist.DataSource=ds;dgd_roomlist.DataBind();cn.Close();