简体   繁体   English

无法通过ODBCDataAdapter / CommandBuilder更新进度表

[英]Cannot update Progress table through ODBCDataAdapter/CommandBuilder

I'm making a simple CRUD app in C# for any single table in our database, interfacing with a Progress database through an ODBC connection. 我正在用C#为数据库中的任何单个表制作一个简单的CRUD应用程序,并通过ODBC连接与Progress数据库连接。 I'm using an OdbcDataAdapter with an OdbcCommandBuilder attached to it. 我正在使用OdbcDataAdapter并附加了OdbcCommandBuilder。

OdbcCommandBuilder never seems to SET all the values in the row I change, providing incorrect SQL statements to the DataAdapter. OdbcCommandBuilder似乎从未设置过我更改的行中的所有值,从而为DataAdapter提供了错误的SQL语句。

For example, in the Brown table, I change the Name column, but get the Update SQL where nothing is set: 例如,在“棕色”表中,我更改了“名称”列,但获得了未设置任何内容的Update SQL:

"UPDATE \"PUB\".\"brown\" WHERE ((\"cust-num\" = ?) AND (\"cust-seq\" = ?))"

In the agent-d table, I change the Parent-Name column, but get the Update SQL to change the agent number: 在agent-d表中,我更改了Parent-Name列,但获取Update SQL来更改代理号:

"UPDATE \"PUB\".\"agent-d\" SET \"agent\" = ? WHERE ((\"agent\" = ?) AND (\"parent-num\" = ?) AND (\"cust-num\" = ?))"

Why am I not getting appropriate SQL from the OdbcCommandBuilder? 为什么我不能从OdbcCommandBuilder获取适当的SQL?

发现Progress / OpenEdge DB和ODBC Command Builder不能很好地协同工作,这就是为什么我得到笨拙的Update语句的原因。

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

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