Feeds:
Posts
Comments

Posts Tagged ‘stored procedure’

I was troubleshooting some long executing code when I discovered the difference between Execute on server command and it’s sibling checkbox in the method properties.

What you need to know:

Use checkbox if you care about the results of the executed code, you want the server to handle the processing and don’t care that the client waits for the response.

Use command to detach the wait from the client and process the code asynchronously.

I won’t go into much detail as it is well documented, but if you do some deep reading.

Tim Penner on “Command vs. Property”

One important difference is that the Execute on Server command always creates a new process, whether it is called in Client/Server mode or in single-user mode; the Execute on Server command still creates a new process.

In contrast the Execute on Server method attribute will not create a new process on the server, but will instead use a “twin” process of the client process that requested the execution. In Single-user mode, this method property has no affect and the method runs in the same process that requested its execution.

More Information
Execute on Server attribute:
http://www.4d.com/docs/CMU/CMU40945.HTM
Execute on Server command:
http://www.4d.com/docs/CMU/CMU00373.HTM
Stored Procedures:
http://www.4d.com/docs/CMU/CMU40975.HTM

Advertisements

Read Full Post »

Recently I needed to added some functionality to MySQL (5.1) for a project I am working on.

Several different stored routines needed to be written, so I went about writing them. Having never written (what I know now are refered to as “routines) for MySQL I went to the logical place: MySQL Documentaiton.

Being impatient I glanced at the first few lines and found this:

Header: “19.2. Using Stored Routines (Procedures and Functions)”
My Thought: Ok, so MySQL considers routines to be either procedures or functions, and because the documentation for both is all on one page, there couldn’t be that much difference between the two.

In fact on the main landing page for routines, there is no mention of the distinct differences between a procedure and a function.

All I’m asking is that MySQL create two separate pages for both CREATE PROCEDURE and CREATE FUNCTION, or at the very least have a comparison page for the have and have notes for the different routine types.

I won’t delve into the many differences as google returns the more relevant results, but at a high level CREATE FUNCTION seems better suited for simple non-cursor based routines that return values and CREATE PROCEDURE for more complicated cursor based routines.

Read Full Post »

%d bloggers like this: