I am getting capability error whenever I am trying to set active property tue. I want to bind the grid with the stored procedure that takes one parameter.

If I do it through TQuery How do I specify the fields. I am using wwDBGrid.

MessageMembershipSelectQuery.Params[0].AsString :=  
custQuery.FieldByName('cust_code').AsString;
MessageMembershipSelectQuery.Active := True;

Please guide

有帮助吗?

解决方案

Replace you Query component by a StoredProc component. Also, check your parameter data type. If it is indeed a string parameter, then it´s Ok to use AsString, but if the parameter has a different data type, like Integer, for instance, then you should assign it´s value by using, for instance, AsInteger.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top