在应用程序服务器中有二个AdoQuery:AdoQuery1,AdoQuery2
AdoQuery1.Sql为:select * from Master where MasterID like '%' + :MasterID + '%'
AdoQuery2.Sql为:select * from Detail where MasterID =:MasterID
在客户端程序中有两个相对应的ClientDataSet:ClientDataSet1,ClientDataSet2
ClientDataSet1为主表,ClientDataSet为子表,
通过ClientDataSet1的AfterScroll事件关联
现在的问题是:
修改,删除,保存等都正常,但是新增时(ClientDataSet1.Append)会出错如下:
The text, ntext, and image data types cannot be used in the WHERE, HAVING, or ON clause, except with the LIKE or IS NULL predicates.
而我的数据库中并无此类型的字段,为什么呢?
我再试了一下,如果不是用三层,直接是用AdoQuery1.append就不会出错!
请各位不吝指教!