[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [jfw] PDO driver not working



Hi Dodinz,

While there is a PDO Driver class, it is abstract as you noted in your error message so it's actually meant to be extended so that a specific PDO Driver class is available for the database type you want to use.

For example, the Oracle driver builds on top of the PDO class and for the $option['driver'] line you would type the following instead:
$option['driver'] = 'oracle';

Which type of database are you wanting to connect to?

-Omar



On Wed, Oct 1, 2014 at 2:41 AM, Dodinz Ballecer <dsjballecer AT gmail.com> wrote:

Hello,

I tried to use the PDO driver for my 2nd database connection by setting this code to my model class:

$option['driver'] = 'pdo'; // Database driver name
$option['dsn'] = 'DSNname';

$option['host'] = 'xx.xx.xx.xx'; // Database host name
$option['port'] = '1433'; // Database host name
$option['user'] = 'sa'; // User for database authentication
$option['password'] = '$$$$$$$$$'; // Password for database authentication
$option['database'] = 'myDB'; // Database name
$option['prefix'] = ''; // Database prefix (may be empty)

$db = JDatabase::getInstance( $option );
parent::setDbo($db);

But prompted me an error : Fatal error: Cannot instantiate abstract class JDatabaseDriverPdo

Just wanted to ask if this driver is still on the development progress?

Thanks in advance! :)

--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.

--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.