无法确定的metatable [英] Could not determine a MetaTable

查看:3129
本文介绍了无法确定的metatable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个FormView控件和SqlDataSource的简单应用。当我选中启用动态数据支持,我得到如下错误:


 无法确定的metatable。一元表无法确定


  
  

数据源'SqlDataSource1和
  人们不能从推断
  请求的URL。确认表
  被映射到DATS源,或
  该数据源被配置成与
  有效的上下文类型和表名,或
  该请求的一部分
  注册DynamicDataRoute。


任何想法?


解决方案

对于我来说,事实证明,在我的网格视图,列被绑定为一个ASP:DynamicField,而不是一个ASP:BoundField的

改变我的列从类似这样:

 <柱体和GT;
  < ASP:DynamicField数据字段=ID的HeaderText =ID/>
< /专栏>

这样:

 <柱体和GT;
  < ASP:BoundField的数据字段=ID的HeaderText =ID/>
< /专栏>

固定它; - )

I have simple application with FormView and SQLDataSource. When I check "Enable dynamic data support" I get following error:

Could not determine a MetaTable. A MetaTable could not be determined for

the data source 'SqlDataSource1' and one could not be inferred from the request URL. Make sure that the table is mapped to the dats source, or that the data source is configured with a valid context type and table name, or that the request is part of a registered DynamicDataRoute.

Any ideas?

解决方案

For me, it turns out that in my grid view, the columns were bound as an "asp:DynamicField", not as a "asp:BoundField"

ie

changing my columns from something like so:

<Columns>
  <asp:DynamicField DataField="Id" HeaderText="Id" />
</Columns>

to this:

<Columns>
  <asp:BoundField DataField="Id" HeaderText="Id" />
</Columns>

fixed it ;-)

这篇关于无法确定的metatable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆