setting Stored Procedure Prepared

I have recently discovered som errors in my coding concerning the use of the TADOStoredProc component in Borland C++ Builder.
I have in some instances ommitted to do an ADOStoredProc1->Prepared = false before setting the parameters and then doing anADOStoredproc->Pepared = true, prior to executing the stored procedure. This results in un-reliable execution of the stored procedure and I can simply correct this by empoying an ADOStoredProc-.Prepared = false statement.
My question is as follows:
Do I need to set ADOStoredProc->Prepared to false even though I have just set ADOStoredProc->Active to false ?

Roger
LVL 2
alcindorAsked:
Who is Participating?
 
George TokasConnect With a Mentor Commented:
From online help:
>>An application must set Active to false before changing other properties that affect the status of a database or the controls that display data in an application.

I believe that answers the question in the most part.
What this suggests - in my humble oppinion - because I am not expert in the ADO area:
Set active to false FIRST.
Set prepared to false.
Do what you want.
Set all properties.
Set active to true.

George Tokas.
0
 
alcindorAuthor Commented:
This is as expected, I have only encountered one problem so far but I will review my code and make sure that Active is set to false and thenPrepared to false before doing anything else.

Best wishes,

Roger
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.