Solved

terrible problem

Posted on 2003-11-12
5
308 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now