Commonly Used ODBC Functions in PHP

Q

What Are Commonly Used ODBC Functions in PHP?

✍: Guest

A

If you look at the PHP 5 manual, you will see a group of functions listed under the ODBC Functions (Unified) section. The commonly used ODBC functions are:

  • odbc_connect � Establish an OBDC connection.
  • odbc_data_source � Returns information about a current connection.
  • odbc_close � Close an ODBC connection.
  • odbc_exec � Prepare and execute a SQL statement.
  • odbc_fetch_row � Fetch a row - moving the pointer to the a new row in a result object.
  • odbc_result � Get the value of a specific field from the current row of a result object.
  • odbc_fetch_array � Fetch a result row as an associative array.
  • odbc_fetch_object � Fetch a result row as an object.
  • odbc_num_rows � Number of rows in a result.
  • odbc_field_name � Get the name of a specified field index.
  • odbc_field_type � Get the data type of a specified field index.
  • odbc_next_result � Checks if multiple results are available.
  • odbc_free_result � Free resources associated with a result object.
  • odbc_prepare � Prepares a statement for execution.
  • odbc_execute � Execute a prepared statement.
  • odbc_error � Get the last error code.
  • odbc_errormsg � Get the last error message.
  • odbc_tables � Get the list of table names stored in a specific data source.
  • odbc_columns � Lists the column names in specified tables.
  • odbc_autocommit � Toggle autocommit behavior.
  • odbc_commit � Commit an ODBC transaction.
  • odbc_rollback � Rollback a transaction.

 

Testing ODBC DSN Connection Settings

Requirements to Use ODBC Connections in PHP

SQL Server FAQs - PHP ODBC Functions - Connection and Query Execution

⇑⇑ SQL Server Connection Tutorials

2024-03-17, 1244🔥, 0💬