【问题标题】:CRecordset returns Positioned request cannot be performedCRecordset 返回定位请求无法执行
【发布时间】:2020-09-10 17:43:52
【问题描述】:

我收到了这个错误

无法执行定位请求,因为没有可搜索的列 被绑定了

当我做一个简单的更新时。例如。

m_SystemConfigSet->GetRecord();
m_SystemConfigSet->Edit();
m_SystemConfigSet->m_value = 0;
m_SystemConfigSet->Update();

我通过设置='hidDefaultFacilityGroupNumber'进行过滤

我使用的表只有两列,一列是主键。

示例:

setting (PK) | value
color        | 1
shape        | 4

我做字段交换是

pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[setting]"), m_setting);
RFX_Long(pFX, _T("[value]"), m_value);

似乎这个错误非常少见,我能说的最好的就是我的绑定列根本无法搜索。我不确定什么是搜索栏?

【问题讨论】:

    标签: mfc crecordset


    【解决方案1】:

    所以我需要添加一个数字主键。我猜是非数字导致的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-15
      • 1970-01-01
      • 1970-01-01
      • 2017-08-17
      • 2020-07-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多