Hi,
      Thanks for your reply.

   A runtime context, usually simply called a context, is a handle to a
an area in client memory which contains zero or more connections, zero
or more cursors, their inline options (such as MODE, HOLD_CURSOR,
RELEASE_CURSOR, SELECT_ERROR, and so on.) and other additional state
information.

To define a context host variable use pseudo-type sql_context.

For example:
sql_context my_context

Use the CONTEXT ALLOCATE precompiler directive to allocate and
initialize
memory for a context:

EXEC SQL CONTEXT ALLOCATE :context ;

where context is a host variable that is a handle to the context. For
example:

EXEC SQL CONTEXT ALLOCATE :my_context ;

Use the CONTEXT USE precompiler directive to define which context is to
be used by the embedded SQL statements (such as CONNECT, INSERT, DECLARE

CURSOR, and so on.) from that point on in the source file, not in the
flow of program logic. That context is used until another CONTEXT USE
statement is encountered. The syntax is:

EXEC SQL CONTEXT USE {:context | DEFAULT} ;

The keyword DEFAULT specifies that the default (also known as global)
context is to be used in all the embedded SQL statements that are
executed subsequently, until another CONTEXT USE directive is
encountered. A simple example is:

EXEC SQL CONTEXT USE :my_context ;

If the context variable my_context has not been defined and allocated
already, an error is returned.

The CONTEXT FREE statement frees the memory used by the context after it
is no longer needed:

EXEC SQL CONTEXT FREE :context ;

An example is:

EXEC SQL CONTEXT FREE :my_context ;


Please let me know if there is any alternative in MySQL for the above.

Thanks in Advance.

Thanks,
Narasimha


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Shankar Unni
Sent: Saturday, December 11, 2004 3:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Regarding Connection Context

[EMAIL PROTECTED] wrote:

> CONTEXT USE Example:

Do *you* really understand what this feature is supposed to do? Can you
explain it to us in (low-level) detail?

No, MySQL doesn't have a feature like this.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to