my Drupal 6 installation is on a MySql server, while my own custom database is on Oracle. I have made a custom module that can read and write data into my external database, but i would like to use Views module to handle the data to show. I know that I can programmatically build views, but i don't know if I can build one for Oracle DB while Drupal is on Mysql.
You can also set it up using the Views API with
views_hook_data(). (See documentation on views/help/api-tables.html.)
You'll need to add your new database connection settings in your settings file.
// In settings.php for your site // Your drupal (site) database needs to be called 'default' $db_url['default'] = 'mysqli://user:pass@host/drupal_db'; $db_url['oracle_db'] = 'mysqli://user:pass@host/other_db';
Then, in your view hook, define the tables the view should have access to.
$data[$table]['table']['base'] = array( 'field' => 'Primary key', 'title' => t('Field name'), 'help' => t('Field description'), 'database' => 'oracle_db', 'weight' => -10, );