ODBC or Open Database Connectivity is an open standard application programming interface used for accessing hetrogenous datasources.
Imagine you have written several PHP programs which makes a connection to an Oracle database. For some reason now you have decided to use MYSQL instead of Oracle. Supposing you have used a proprietary connection to Oracle, then it would take a lot of coding effort to modify each of the PHP programs to make it connect to MYSQL as it already has connect strings to Oracle.
Now ODBC provides seamless open database connectivity using simple APIs to a variety of data sources such as MYSQL, MS-ACCESS, MSSQL, Oracle etc.,One has to create a ODBC connection for the specific datasource. This can be done using the ODBC dialog box which is accessible from the control panel. One requires a ODBC driver to be installed via Dynamic Link Libraries. There are three types of DSNs (Data Source Names), namely User DSN, System DSN and File DSN.
After ensuring that the driver required to connect to a data source is present one needs to add the data source by manually adding a data source from the ODBC dialog box in the control panel. After adding a database one has to configure it. The method to configure a database varies from one database to another. For example it is different for Oracle than MS-ACCESS as Oracle has a layer of TNS (Transparent Network Substrate). In the case of Oracle the TNS service name is mandatory to create a ODBC connection between client and server. In the case of Microsoft Access one has to just specify the network location of the access database and the name of the database. The ODBC manager accessible from the control panel will take care of all these issues while attempting to create a DSN name.
Here is an example of a PHP program connecting to a MYSQL database via a DSN named as "TestDSN".
$conn=odbc_connect('TestDSN','','');
$sql="SELECT * FROM Employee";
$cursor =odbc_exec($conn,$sql)
One may also connect a PHP program to a database using a DSNLESS connection. The disadvantage of using a DSN based connect string in a server - client system is that one requires to configure the DSN or multiple DSNs being used in the server side scripts( such as PHP) on client computers that or multiple client computers. This is because when a client computer encounters an ODBC string in a PHP program the DSN string has to be configured in the local client. This may not be possible to do when there are a lot of users using such programs. In such cases one uses DSN Less connections where the server's IP address /database name, user id and password are directly mentioned in the connect string.
By Srinivasa Gopal
Article Source: Open Database Connectivity
Article Copyright A pen that copies words that are meaningful to life, so that if words become many will be contained into a meaning of one word it is all cheers of everyone
Pages
- Denkafa Affiliate
- Omnipotent
- Taun17
- Revisi Blogging
- Article Copyright
- Privacy
- Disclaimer
- Terms Of Service
- Sitemap
- Ketentuan Layanan Penerbit Article Copyright
- Ketentuan Layanan Article Copyright
- Ketentuan layanan untuk penulis
- Room Comment Article Copyright
- Tiktok
- MineShiba
- MineWIN
- MineDoge
- MineBTTC
- MineSIA
- MineTRON
- MineEXEC
- CryptoSense
- FoucetPay
- Coinpayz
- Dunia Aneh Blog 89
- Collections Article
- Coriarti
- Pusing Blogger
India and Malaysia recently faced off in a friendly match
India and Malaysia recently faced off in a friendly match, showcasing the talent and skills of both teams. The game was highly anticipated a...
Open Database Connectivity
Label:
Article Copyright,
Canada,
Daily Devotional,
Israel,
Japan,
Malaysia,
Rusia,
Saudi Arabia,
United States
Subscribe to:
Post Comments (Atom)
-
A lot of organizations give importance to cleanliness. Have you thought about yours? A living space that looks clean could actually be hidin...
-
Greater Noida West, better known as Noida Extension, is emerging as a realty hotspot for residential properties in National Capital Region ...
-
In today's time, there is a lot of competition among the business organization. Considering, the upward curve of mobile marketing, most ...
-
There have been many skeptics since the very initial introduction of wireless service about what the constant exposure to radiation can do t...
-
Packaging plays a significant role when it comes to marketing a product. It's what the client sees first, and it will establish their op...
-
India and Malaysia recently faced off in a friendly match, showcasing the talent and skills of both teams. The game was highly anticipated a...
-
Escalate the Expectation of the Endurance Expected By Steve Wickham YOU have a big goal, and the challenge will be more difficult than yo...
-
By Vineet Kumar Singh PageRank (PR) is a mathematical algorithm that Google uses to rank pages of the websites in its search results. As...
-
By Santina Zito Website design is an immensely dynamic process which changes from time to time. As a result, what it seemed to be the ben...
-
By Mike J Mobile application development is a vast market that enjoys patronage from different industries. It has spiked in recent years a...
No comments:
Post a Comment
Informations From: Article copyright