?
Solved

setting Stored Procedure Prepared

Posted on 2012-09-15
2
Medium Priority
?
587 Views
Last Modified: 2012-09-22
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
0
Comment
Question by:alcindor
2 Comments
 
LVL 16

Accepted Solution

by:
George Tokas earned 1600 total points
ID: 38413245
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
 
LVL 2

Author Closing Comment

by:alcindor
ID: 38424758
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

839 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