Results 1 to 5 of 5

Thread: Pro*C compiler/SQL in VC++

  1. #1

    Thread Starter
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524

    Red face Pro*C compiler/SQL in VC++

    Is there any Pro*C compiler available for Windows?

    Can I use Pro*C (or embedding SQL in C) in Visual C++ 5.0?

    Since it is possible to embed DAO/ADO inside VB, I think it should be possible to use SQL in Visual C++ also. But I've no idea how to use it.

    Can anyone help?

    Thank you very much... :-)
    Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
    Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.

  2. #2

    Thread Starter
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524
    Well, can you please tell me how should I write following VB code in VC++?

    <vbcode>
    'ADO has been referenced in the VB project
    Dim cnn As ADODB.Connection
    Dim rs As ADODB.Recordset
    Dim sql As String, strCnn As String

    strCnn = "DSN=MyDatabase"

    Set cnn = New ADODB.Connection
    Call cnn.Open(strCnn)

    sql = "select count(*) from world_countries"
    Set rs = New ADODB.Recordset

    Call rs.Open(sql, strCnn, adOpenDynamic)

    MsgBox rs(0).Value
    </vbcode>

    How do I add reference of ADO to VC++ project?

    Can I do it in a console mode application or DLL?

    Any help is welcome. You can also provide any useful links.

    thanks a lot.
    Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
    Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Yes. Pro*C for windows NT is available. You can deploy to a Win9x (consumer Windows) client.

    It works with MSVC++ 5.0 & 6.0. Obviously, you have to purchase the pre-compiler.

    IMO, using ADO C++ is not productive - it works, but is fairly painful. VB or Pro*C is a lot faster in terms of development times.
    We use COM servers written in Pro*C, talking to VB clients.
    And Oracle Forms as well.

    The other issue - which is more important - MS drivers for ADO do not provide full access to all of Oracle's SQL and PL/SQL features.
    Pro*C does. But it must use Oracle drivers.

    Another point - Oracle licenses on a per seat basis. Therefore, every PC that connects to an Oracle server (except via Microsoft drivers, hence one reason why Ellison & Bill Gates love each other) must pay that licensing fee. We use the Merant (Oracle) drivers.

  4. #4

    Thread Starter
    Fanatic Member sbasak's Avatar
    Join Date
    Aug 2001
    Location
    Globe Trotter
    Posts
    524
    Well, thanks for your comments. But could you please still help me writing that ADO code in VC++?

    Thanks a lot
    Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
    Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.

  5. #5
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    I don't do ADO, some other programmers here do. They said 'tell him to avoid it or learn MFC and ADO'
    Start here:

    http://codeguru.earthweb.com/mfc_database/Ado_Aok.shtml

Posting Permissions

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



Click Here to Expand Forum to Full Width