This example illustrates how to create an ODBC Connection for php application.
Follow the given steps to create an ODBC connection to a MS Access Database:
|
Now we can use the DSN when connecting to the database. In the given example
below, 'myodbc' is the DSN for the database. Connection from database is created
using
odbc_connect() and query "SELECT * FROM emp"
is executed using odbc_exec(). The
result is fetched using odbc_fetch_row().
Source Code of sqlodbc.php
<html>
|
Output:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: PHP SQL ODBC
Post your Comment