[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C.
From: |
Kevin Dziulko |
Subject: |
Re: Looking for mode for Oracle Pro*C. AKA embedded SQL/C. |
Date: |
Mon, 19 May 2003 08:19:16 -0400 (EDT) |
On 17 May 2003, Tim X wrote:
> >>>>> "Mamouliane" == Mamouliane <here@home.qc.ca> writes:
>
> Mamouliane> Oracle Pro*C is basically a pre-processor. It takes a
> Mamouliane> source file written in C and containing SQL
> Mamouliane> statements. Hence the name embedded SQL. The
> Mamouliane> pre-processor replaces all SQL statements by C statements
> Mamouliane> & function calls. In the end what you have is C source
> Mamouliane> code that is then compiled and linked with Oracle
> Mamouliane> libraries. This is a very basic description of what it
> Mamouliane> does but you get the idea.
>
> Mamouliane> Is anyone aware of such a mode available for Pro*C? I
> Mamouliane> know of a SQL mode and PL/SQL mode but can't find a mode
> Mamouliane> for Pro*C or embedded SQL/C. Should I write such a mode?
> Mamouliane> Is it very difficult? It would basically be an extension
> Mamouliane> to the available C mode. There is already modes for SQL
> Mamouliane> and PL/SQL out there so I figure I would use that too.
>
> Before writing your own mode, maybe check out multi-mode-mode which
> allows you to use multiple modes in one buffer. I've not used it
> myself, but remember seeing an article in one of the newsgroups where
> someone was using sql-mode and c-mode for Oracle proc.
>
> Tim
>
>
Please let us know if this works well or not. I also write c code with
embedded SQL, and often get frustrated that indentation doesn't work the
way that I would like it too. I am using esqlc for ingres. Thanks!