简体   繁体   English

更新数据库accdb后绑定源更新报错

[英]Binding source update error after updating the database accdb

I have a winform connected to.accdb file, but while creating rdlc report I found that the naming wa not correct in my accdb file(contained hyphen) and I changed it accordingly and configured the data-set query too and refreshed the connection, but still during execution the below error is coming.我有一个 winform 连接到.accdb 文件,但是在创建 rdlc 报告时我发现我的 accdb 文件中的命名不正确(包含连字符)我相应地更改了它并配置了数据集查询并刷新了连接,但是仍然在执行过程中出现以下错误。

System.ArgumentException: 'Cannot bind to the property or column Condition_of_DIE-7 on the DataSource.

Parameter name: dataMember'参数名称:dataMember'

And this is my master table SQL:这是我的主表 SQL:

SELECT
    ID,
    Size_in_mg,
    Die_head_number,
    Inspection_Date,
    Next_Calibration_On,
    Die_size_in_microns,
    Condition_of_DIE_1,
    Condition_of_DIE_2,
    Condition_of_DIE_3,
    Condition_of_DIE_4,
    Condition_of_DIE_5,
    Condition_of_DIE_6,
    Condition_of_DIE_7,
    Observations,
    Inspector,
    Issued_to_Maintanance
FROM MSdies

And this is where the error is showing is my program.cs file这就是错误显示的地方是我的 program.cs 文件

static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new FormMsdies());
}

As I am very new to C# I can't understand how to correct this please help me: please refer the below images for further help:因为我是 C# 的新手,所以我不明白如何纠正这个问题,请帮助我:请参考下面的图片以获得进一步的帮助: 在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Your columns are defined as Condition_of_DIE_7 and so on, but the error shows clearly that somewhere in your code, you're still using a - instead of a _ :您的列被定义为Condition_of_DIE_7等等,但错误清楚地表明在您的代码中的某处,您仍在使用-而不是_

System.ArgumentException: 'Cannot bind to the property or column Condition_of_DIE-7 on the DataSource. System.ArgumentException: '无法绑定到数据源上的属性或列Condition_of_DIE-7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM