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
April 3rd, 2013, 11:06 AM
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. ;)
April 4th, 2013, 09:30 AM
hey , don't get u can u explain me again in a simple way , i am newcommer to this field
April 4th, 2013, 09:49 AM
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
April 5th, 2013, 01:38 AM
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.