Results 1 to 6 of 6

Thread: Embedded SQL

  1. #1
    Join Date
    Nov 2008

    Question Unanswered: Embedded SQL

    Hi Friends,

    how to write Embedded SQL (C/C++) in SQL SERVER (Like Pro*C/C++ in Oracle) ??

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    What do you mean by "embedded SQL"?
    Can you provide an example?
    Home | Blog

  3. #3
    Join Date
    Nov 2008


    Embedded SQL is a method of combining the computing power of a programming language and the database manipulation capabilities of SQL. Embedded SQL statements are SQL statements written inline with the program source code of the host language. The embedded SQL statements are parsed by an embedded SQL preprocessor and replaced by host-language calls to a code library. The output from the preprocessor is then compiled by the host compiler. This allows programmers to embed SQL statements in programs written in any number of languages such as: C/C++, COBOL and Fortran.

  4. #4
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    why write language/platform specific database calls when you can write sql that will work across platforms?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Microsoft hasn't supported the "embedded SQL" model for around ten years. It was popular in the 1990s because that's what programmes had been accustomed to using, but it was really already obsolete then.

    You can access SQL from within any of the Microsoft Visual tools using ADO. If you are using one of the current generation of "dot net" compilers, you should use ADO.NET to access SQL (and just about any other data source).

    If you can tell me what compiler you are using, I can quickly hit to find you appropriate documentation. Making the switch from embedded SQL to function based SQL isn't hard, and it is way more efficient.


  6. #6
    Join Date
    Nov 2008
    yes, truly speaking the concept of Embedded SQL started with languages like PRO*C, which is nothing but you can write SQL inside a C program. This was introduced because Oracle as a DBMS did not have PL/SQL
    at that time. It was in Oracle7 that they introduced PL/SQL. There
    were many reasons for introducing such a methodology at that time.
    1.C was the main language of choice. 2.DBMS as a 4GL almost failed.
    3. We needed 3GL tools and so on.

    As Pat and George are saying, Microsoft has rich object oriented tools to access databases from outside the database environment.

    And I liked your explanation of what Embedded SQL is

    hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts