Solved

terrible problem

Posted on 2003-11-12
5
311 Views
Last Modified: 2010-04-05
i have a mdb data base(with a query)
i add some components
after that when i push a button i delete all records like that
calcul.SQL.Clear;
calcul.SQL.Add('delete from calcQuery');
calcul.ExecSQL;
now when i want to add again records is a error and i don't know why
error is like this
Current provider does not support returning multiple recordsets from a single execution
How can i rezolve this
Thanks
35
0
Comment
Question by:tinti13
5 Comments
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9730829
>now when i want to add again records is a error and i don't know why
How do you add the records?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9730923
guessing u use the same query

for a select-query you must use open-method

just a guess, and as gloomy alread asked:
How do you add the records?

meikl ;-)
0
 

Accepted Solution

by:
saienlyh earned 35 total points
ID: 9731540
//del table
with Calcul do
begin
  SQL.Clear;
  SQL.Add('delete * from  calcQuery');
  ExecSQL;
  if not active then active = true;
end;


0
 
LVL 5

Expert Comment

by:DeerBear
ID: 9731838
Hi,

I noticed you set active AFTER ExecSQL, but I don't see the
inverse operation BEFORE the ExecSQL.

Plus, you don't reset the SQL property before reopening the query.

HTH,

Andrew
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9762365
just wondering about the accepted answer
-> this answer should usual cause an exception
--> if this is wanted?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question