Board index » delphi » Insert Query: ENoResultSet -- Error Creating Cursor Handle

Insert Query: ENoResultSet -- Error Creating Cursor Handle

Whenever I try to run the following query:

  sql.add('Insert into ":alias1:table1.db" (cid)');
    sql.add('Select distinct d1.cid from ":alias1:orders.db" d,');
    sql.add('   ":alias1:main.db" d1');
    sql.add('where (d.Code = "PAY")');
    sql.add('  and (d.ID = d1.ID)');

I get the error ENoResultSet -- Error Creating Cursor Handle. I have
split the query up and I have about 85 values to insert. What am I doing
wrong.

 

Re:Insert Query: ENoResultSet -- Error Creating Cursor Handle


Sorry--I needed to use ExecSQL and not Open; haven't made that
mistake in so long I forgot about it.

"John C. Bell III" <jcb...@us.net> wrote in message
news:97s2in$aat$1@bob.news.rcn.net...

Quote
> Whenever I try to run the following query:

>   sql.add('Insert into ":alias1:table1.db" (cid)');
>     sql.add('Select distinct d1.cid from ":alias1:orders.db" d,');
>     sql.add('   ":alias1:main.db" d1');
>     sql.add('where (d.Code = "PAY")');
>     sql.add('  and (d.ID = d1.ID)');

> I get the error ENoResultSet -- Error Creating Cursor Handle. I have
> split the query up and I have about 85 values to insert. What am I doing
> wrong.

Other Threads