CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: DAO and ORACLE

  1. #1
    Join Date
    May 1999
    Posts
    44

    DAO and ORACLE

    Hi!

    Does anyone out there know how to use DAOs, in order to retrieve data out of a ORACLE
    database or is the only chance to do so using ODBC drivers.

    Thanks to anyone who can help me with this problem.

    --
    apartis AG http://www.apartis.de
    Normen Mueller

  2. #2
    Join Date
    May 1999
    Location
    AP, INDIA
    Posts
    11

    Re: DAO and ORACLE

    ORACLE can be used with ODBC. DAO can be used to access ODBC databases. In that way you can use ORACLE from ODBC. DAO does not communicate with ORACLE directly. See help for Open in CDaoDatabase class.

    CDaoDatabase::Open

    virtual void Open( LPCTSTR lpszName, BOOL bExclusive = FALSE, BOOL bReadOnly = FALSE, LPCTSTR lpszConnect = _T("") );
    throw( CDaoException, CMemoryException );

    lpszConnect is the ODBC connect string.



    Srikanth Software Consultancy
    Indian Company working on Visual C++.
    29-7-34,SURYARAOPET,
    VIJAYAWADA-520002.

  3. #3
    Join Date
    May 1999
    Posts
    44

    Re: DAO and ORACLE

    Thanks a lot, I'll try it, but just one more question:
    What do you think about Embedded SQL?

    Thanx
    Normen

    --
    apartis AG http://www.apartis.de
    Normen Mueller

  4. #4
    Join Date
    May 1999
    Location
    AP, INDIA
    Posts
    11

    Re: DAO and ORACLE

    Hi Mr.Normen,
    I haven't used embedded SQL. I have used SQL in ODBC and DAO. If you think you
    would be using only Access .mdb files you get better performance with DAO since DAO is
    native for Access. But ODBC is THE BEST. Using ODBC directly gives better
    performance than using DAO with ODBC.
    Earlier I have used plain files with my own code to simulate indexes. Now after getting
    the taste of C++, I can not think of using the old methods again.
    Recently, I got a LAN project in a Govt. organisation. They were using Novell Netware
    and DOS. I asked them I need Windows95 :-). I can not think of spending several hours
    writing code to open a file in shared mode and checking for locks now.
    Since they were using diskless nodes they said atmost they could install Windows 3.1 or
    3.11(workgroups). I think Windows95 can be installed on a server and can be used over
    diskless nodes also. What do you say?

    Srikanth


    Srikanth Software Consultancy
    Indian Company working on Visual C++.
    29-7-34,SURYARAOPET,
    VIJAYAWADA-520002.

  5. #5
    Join Date
    May 1999
    Posts
    44

    Re: DAO and ORACLE

    To start with, I am not very used in database programming in VC++, because I used to write my code
    in SQLWindows, Centura
    So, I am an absolut beginner, which concerns C++ and databases. Usually I use C/C++ in order to
    write some Dlls or ActiveX controls, but now I also want to use C/C++ to connect to the database, so please be patient.
    Did I get it right, that the best way to do so, if I want to connect to ORACLE database, is using ODBC
    directly?

    To answere your question, I want to be impolite and just give you an other question:
    Why do you want to use Windows95 and not NT?
    The stuff you mentioned above considering Windows 3.11 or DOS, in my opinion, is absolute out of question.

    Bye
    Normen

    --
    apartis AG http://www.apartis.de
    Normen Mueller

  6. #6
    Join Date
    May 1999
    Location
    AP, INDIA
    Posts
    11

    Re: DAO and ORACLE

    YES. Use ODBC directly. If you use ODBC you can switch to other databases equally. In one civil engineering project I have done recently, I have used Access at first. Then I was able to switch it to oracle immediately. Use the classes CDatabase and CRecordset classes. They are similar to DAO classes. Using these classes also means using ODBC directly. You need not use the ODBC functions.
    Regarding the NT, In INDIA software is very much costly. We can not afford to invest somewhere around Rs.1,00,000/- just for the NT(for 5 users). The organisation does not want to invest that much. Whereas Windows95 comes for Rs.4,000/- only.
    I would have used LINUX for the system. But, I am a new comer to LINUX world. I could not find a good development tool for LINUX.(and I have not done embedded SQL ever).

    Srikanth.



    Srikanth Software Consultancy
    Indian Company working on Visual C++.
    29-7-34,SURYARAOPET,
    VIJAYAWADA-520002.

  7. #7
    Join Date
    May 1999
    Posts
    44

    Re: DAO and ORACLE

    Thank you very much vor your comment!
    I´ll try it with ODBC and let you know my result...

    Bye
    Normen

    --
    apartis AG http://www.apartis.de
    Normen Mueller

  8. #8
    Join Date
    May 1999
    Posts
    44

    Re: DAO and ORACLE

    PLEASE help me!

    How do you start an ODBC - Project with VC++ 6.0
    Here is what I have done:

    1. Create an ODBC connect to the database
    2. Launched MSDEV
    3. Create a new project 'Database Project'
    3.1 Specified the ODPC source
    3.2 Logged in
    4. Project is done
    5. Opened the 'Tables' folder
    6. Doubled click on a table
    7. ERROR: "ADO could not find specified provider"
    8. What the h... do I have to do now?!?

    I am sorry, I think it is very simple for you, but I told you in that case I am an absolute beginner looking for support...

    Thank you in advance
    Normen

    --
    apartis AG http://www.apartis.de
    Normen Mueller

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

Featured