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

Thread: ODBC & Oracle

  1. #1
    Join Date
    Nov 2013
    Posts
    24

    ODBC & Oracle

    I want to see example of using ODBC & Oracle.
    Could someone give one?
    Which is the best book for ODBC & Oracle?

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: ODBC & Oracle

    Have a look at MFC CDatabase and CRecordset classes.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2013
    Posts
    24

    Re: ODBC & Oracle

    Quote Originally Posted by VictorN View Post
    Have a look at MFC CDatabase and CRecordset classes.
    Thank you.
    Do you have some best of your examples using CDatabase ang CRecordset?
    Could you give the master secrets?
    Last edited by ArnoldRich; December 16th, 2013 at 11:28 PM.

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: ODBC & Oracle

    Quote Originally Posted by ArnoldRich View Post
    Thank you.
    Do you have some best of your examples using CDatabase ang CRecordset?
    Could you give the master secrets?
    Why don't you read the documentation first and then come back with questions. MSDN is full of examples.

  5. #5
    Join Date
    Nov 2013
    Posts
    24

    Post Re: ODBC & Oracle

    Quote Originally Posted by GCDEF View Post
    Why don't you read the documentation first and then come back with questions. MSDN is full of examples.
    Thank you.
    Because there are a lot of fake code with bad examples in the documentation, which are not suitable.

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: ODBC & Oracle

    Quote Originally Posted by ArnoldRich View Post
    Thank you.
    Because there are a lot of fake code with bad examples in the documentation, which are not suitable.
    MSDN is "full of fake code with bad examples"? That's one of the goofier things I've read on this site.

  7. #7
    Join Date
    Nov 2013
    Posts
    24

    Re: ODBC & Oracle

    Quote Originally Posted by GCDEF View Post
    MSDN is "full of fake code with bad examples"? That's one of the goofier things I've read on this site.
    I did not write "MSDN".
    There are many examples in MSDN which are for the professors's level.
    Sometimes examples are absent even in MSDN.
    Unfortunately, in the Internet you can find fake code with bad examples.
    Could you give me seasoned and tested code with pure ODBC?
    Last edited by ArnoldRich; December 20th, 2013 at 06:57 AM.

  8. #8
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: ODBC & Oracle

    Quote Originally Posted by ArnoldRich View Post
    I did not wrote "MSDN".
    There are many examples in MSDN which are for the professors's level.
    Sometimes examples are absent even in MSDN.
    Unfortunately, in the Internet you can find fake code with bad examples.
    Could you give me seasoned and tested code with pure ODBC?
    No. Look at MSDN. Try their explanations and examples. If something from MSDN doesn't make sense or doesn't work, post your attempt at it and I, or somebody else, will tell you what you did wrong. Their examples and explanations are as good as or better than anything I could come up with.

    You need to learn to use the documentation. You can't just decide it's all useless and post here every time you have a question without putting some effort into it yourself first.

  9. #9
    Join Date
    Nov 2013
    Posts
    24

    Re: ODBC & Oracle

    Thank you GCDEF.
    I'll use your recommendations for sure.
    Don't you have tested pure ODBC examples?

  10. #10
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: ODBC & Oracle

    Quote Originally Posted by ArnoldRich View Post
    Thank you GCDEF.
    I'll use your recommendations for sure.
    Don't you have tested pure ODBC examples?
    Of course I do, but once you understand it, you'll realize why they won't do you much good. You'll have to learn how to derive a class from CRecordset that's specific to your database and your tables. It's really not very difficult. I'm not sure why you're so reluctant to give it a try.

    This is probably a good place to start.
    http://msdn.microsoft.com/en-us/library/w2c4cthk.aspx

  11. #11
    Join Date
    Nov 2013
    Posts
    24

    Re: ODBC & Oracle

    Quote Originally Posted by GCDEF View Post
    Of course I do, but once you understand it, you'll realize why they won't do you much good. You'll have to learn how to derive a class from CRecordset that's specific to your database and your tables. It's really not very difficult. I'm not sure why you're so reluctant to give it a try.

    This is probably a good place to start.
    http://msdn.microsoft.com/en-us/library/w2c4cthk.aspx
    Thank you. I'll try.
    But I must use the same ODBC code for applications in Windows and Linux. As far as I know MFC are not usable for Linux, though ODBC can be used.
    Last edited by ArnoldRich; December 23rd, 2013 at 12:41 AM.

  12. #12
    Join Date
    Apr 1999
    Posts
    27,449

    Re: ODBC & Oracle

    Quote Originally Posted by ArnoldRich View Post
    Thank you. I'll try.
    But I must use the same ODBC code for applications in Windows and Linux. As much as I know MFC are not usable for Linux, though ODBC can be used.
    Then go here and read the documentation (there is even a sample program):

    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

    ODBC is a specification, therefore it is not dependent on the OS. The same ODBC function calls will work for both Windows and Linux, as long as the database driver is ODBC compliant. All you need to do is specify the right driver and connect string in the SQL calls.

    Regards,

    Paul McKenzie

  13. #13
    Join Date
    Nov 2013
    Posts
    24

    Re: ODBC & Oracle

    Mister Paul McKenzie.
    Thank you very much indeed.

Tags for this Thread

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