Hi All,
I’ve been using the YiiDB2 extension (http://www.yiiframework.com/extension/yiidb2/) while testing out the framework on a project I’m working on.
I’ve noticed an issue (which I think is with the extension), where I’m unable to update rows in a table using the ibm_db2 driver. Attempting to follow the ‘Getting Started: Creating Your First Application’, I’ve created installed the DB2 extension as per the extension instructions, and I’ve created the model, controller and views using the Gii generator. This lets me add users, view users and remove them, but not update them.
I get the following issue when trying to update a record (a user in this case):
PHP warning
db2_bind_param(): Describe Param Failed
/data/mgnt/www/protected/extensions/yiidb2/CIbmDB2PdoStatement.php(73)
73 if (!db2_bind_param($this->_stmt, $numColumn, "variable", DB2_PARAM_IN, $type)) {
74 throw new CIbmDB2PdoException(db2_stmt_errormsg());
75 }
76 return true;
I have added the following code in my config/main.php:
'db' => array(
'connectionString' => 'ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=testdb;HOSTNAME=mydbserver.example.com;PORT=60000;PROTOCOL=TCPIP;',
'username' => 'dbuser',
'password' => 'passw0rd',
'class' => 'ext.yiidb2.CIbmDB2Connection',
),
I have also added the following to the import section of my config/main.php (not sure if this is needed?):
'import'=>array(
'application.models.*',
'application.components.*',
'ext.yiidb2.*',
),
I’ve used the yiidb2-ibm_db2-beta3.zip from the extension page. Downloaded and extracted it to /protected/extensions and renamed the folder to yiidb2. I’m running Yii 1.1.13 on PHP 5.4.17, with ibm_db2 configured correctly. DB2 Client version is 9.5.0.
It doesn’t appear to be an error with any of the code I’ve written (because I’ve used the Crud generator for all of it!), so I’m not sure if I’ve mis-configured something, or if this is a bug with the extension.
Hopefully someone can point me in the right direction.
Thanks in advance!
Rob.