Getting DataSet is not in Edit Mode error for simple query with UNION....
Posted: Mon 20 Nov 2006 12:52
Hi,
FYI: We are working with SDAC Licensed version....
I have a query component with below query:
Below query is just an example which i'm using in my project.
select groupno, pg_permission from #_usr_groups
union
select distinct '' as groupno, 'V' from usergrp
In FormCreate event i have following code:
MSQuery.Open; //working fine
MSQuery.Edit; //Throwing an error here...
MSQuery.fieldbyname('pg_permission').AsString := 'F';
Problem is when i say MSQuery.Edit, it is throwing an error that "DataSet is not in Edit mode". So why i'm getting an error when i do union with some other query?
Can you please suggest me how to over come this issue.
FYI: We are working with SDAC Licensed version....
I have a query component with below query:
Below query is just an example which i'm using in my project.
select groupno, pg_permission from #_usr_groups
union
select distinct '' as groupno, 'V' from usergrp
In FormCreate event i have following code:
MSQuery.Open; //working fine
MSQuery.Edit; //Throwing an error here...
MSQuery.fieldbyname('pg_permission').AsString := 'F';
Problem is when i say MSQuery.Edit, it is throwing an error that "DataSet is not in Edit mode". So why i'm getting an error when i do union with some other query?
Can you please suggest me how to over come this issue.