DBExpress batch sql query execution errors, urgent! !

Category: Delphi -> Database Author: tang806873435 Date: 2009-05-04 15:41:36
2009-05-04 15:41:36
Database is sql server 2000, you need to perform the following paragraph sql statement

select barcode, batchno, sum (outnumber) as outnumber into # t from salelog group by ; barcode, batchno order by barcode

select a. *,
case when b.outnumber is null then a.totalnumber
else a.totalnumber-b.outnumber end as leftnumber from productbase a left join # t b on a.barcode = b.barcode

drop table # t

use adodataset can directly return the results, but with the dbexpress of simpledataset will not work, check the internet a lot of information, can not find the answer, please advise! !
use acitive: = True and Open will prompt: "cursor not returned from query"
but using Excutesql not return a result set, really Chousi . Why do they always say dbexpress than ADO high efficiency, how it feels without ado easy to use?
2009-05-04 15:59:12
dbexpress is not updatable single data set, certainly better than ado high efficiency slightly.
Otherwise, ado.net how the structure will be copied dbexpress ...
2009-05-04 16:18:57
this simple ah, Web search get the answer.