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

Thread: help

  1. #1
    Join Date
    Mar 2013
    Posts
    11

    help

    hey , my existing code is making database connectivity with oci library ,but know we want to make the database connection using odbc on solaris/linux.
    A code module has been written for the ora11gconnection ,how i should make changes in the code so that it can have odbc connectivity , and can also connect through mysql .


    Thanks in advance

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    1,998

    Re: help

    Abstract away the concrete database APIs in such a way that your application is programmed against the abstract interface and one or more implementations translate this to a specific API.

    General question, general answer.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  3. #3
    Join Date
    Mar 2013
    Posts
    11

    Re: help

    hey , don't get u can u explain me again in a simple way , i am newcommer to this field

    thanks

  4. #4
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,001

    Re: help

    As D_Drmmr already pointed out to get more specific answer you have to provide more specific information.
    But anyway, what you will need is The Connection String Reference
    Victor Nijegorodov

  5. #5
    Join Date
    Mar 2013
    Posts
    11

    Re: help

    ok , i am trying to explain my question properly to the extent what i can.
    Actually we are currently using oci lib as a driver and ora11g database for our c++ code . The following code modules are being used to give this connectivity, i am only giving the names of the modules being used.
    database.h dbconnection.d dbexception.cpp dbrecordtype.o dbstatement.h ora11gcollection.o ora11gconnectionpool.h ora11gresultset.d
    databaselib.h dbconnection.h dbexception.d dbresultset.cpp dbstatement.o ora11gconnection.cpp ora11gconnectionpool.o ora11gresultset.h
    dbcollection.cpp dbconnection.o dbexception.h dbresultset.d libdatabase.so ora11gconnection.d ora11grecordtype.cpp ora11gresultset.o
    dbcollection.d dbconnectionpool.cpp dbexception.o dbresultset.h makefile ora11gconnection.h ora11grecordtype.d ora11gstatement.cpp
    dbcollection.h dbconnectionpool.d dbrecordtype.cpp dbresultset.o ora11gcollection.cpp ora11gconnection.o ora11grecordtype.h ora11gstatement.d
    dbcollection.o dbconnectionpool.h dbrecordtype.d dbstatement.cpp ora11gcollection.d ora11gconnectionpool.cpp ora11grecordtype.o ora11gstatement.h
    dbconnection.cpp dbconnectionpool.o dbrecordtype.h dbstatement.d ora11gcollection.h ora11gconnectionpool.d ora11gresultset.cpp ora11gstatement.o


    Now what i have to do is to use odbc as a driver and MS SQL as a database . so i am still confused where to start . that is i have to write code for MS SQLconnection.cpp and MS SQLconnectionpool.cpp , the code for dbconnection.cpp and the dbconectionpool.cpp to remain the same as it will be common for any type of database being used .
    From where and how should i proceed.

    Thanks in advance

  6. #6
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,001

    Re: help

    You may want to look at some existent ODBC wrapper classes like http://www.naughter.com/odbcwrappers.html
    Victor Nijegorodov

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center