[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

terrible problem

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
tinti13
Asked:
tinti13
1 Solution
 
GloomyFriarCommented:
>now when i want to add again records is a error and i don't know why
How do you add the records?
0
 
kretzschmarCommented:
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
 
saienlyhCommented:
//del table
with Calcul do
begin
  SQL.Clear;
  SQL.Add('delete * from  calcQuery');
  ExecSQL;
  if not active then active = true;
end;


0
 
DeerBearCommented:
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
 
kretzschmarCommented:
just wondering about the accepted answer
-> this answer should usual cause an exception
--> if this is wanted?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now