Subject | Re: [firebird-support] Services API with embedded client? |
---|---|
Author | Helen Borrie |
Post date | 2009-02-04T01:22:46Z |
At 11:41 AM 4/02/2009, you wrote:
The command-line utilities (at least) pass a return code back to the caller. Best guess is that they derive the return code from the Error Status array of the function calls that correspond to the isc_service_xxx() function calls. All of those isc_service_ functions have an Error Status array. What I can't guess is whether a Services API call actually returns the SQL completion code (0) on database-level operations but you could explore that.
If you wanted to check the current status of the header attributes for verification, an isc_database_info() call is cheap.
./heLen
>On 2 Feb 2009, at 17:01, Helen Borrie wrote:That's good. :-) Thanks for the tip about the SPB parameter order - apart from the compulsory first parameter, the *D*PB doesn't care about the order of the params, according to available doc. For the *S*PB we don't actually have any doc, so I'll note this observation.
>
>> Please test it. I'd really like to know how you get on with this.
>
>I'm happy to report that it works, although it seems that the service
>API is a lot touchier about the order of parameters in the parameter
>block.
>One question: Am I supposed to issue some sort of service query toAs the SM routines execute the same code as the corresponding command-line utilities, my assumption would be that the same routines that are "blocking" when run from the executables are also "blocking" when run by the SM. That would necessarily be any operation that requires exclusive access, such as changing the mode attribute in the DB header.
>figure out when it is done, or does this one block?
The command-line utilities (at least) pass a return code back to the caller. Best guess is that they derive the return code from the Error Status array of the function calls that correspond to the isc_service_xxx() function calls. All of those isc_service_ functions have an Error Status array. What I can't guess is whether a Services API call actually returns the SQL completion code (0) on database-level operations but you could explore that.
If you wanted to check the current status of the header attributes for verification, an isc_database_info() call is cheap.
./heLen