Hi,
I am testing Yii with 3 tables and 4 Database Server.
All do work well, except 1 Oracle table that has a NUMBER field:
CREATE TABLE "EXEMPLO"."SERVICO" (
"CHAVE" VARCHAR2(10 BYTE) NOT NULL ENABLE,
"DESCRICAO" VARCHAR2(100 BYTE) NOT NULL ENABLE,
"PRECO" NUMBER(11,2) NOT NULL ENABLE,
"DATE_TIME" TIMESTAMP (3)
)
When I try to create a record, I get the following error:
CDbException
D:\php\yii\framework\db\CDbCommand.php(221)
00221: throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
I have included some "echos" in my code:
public function bindValue($name, $value, $dataType=null)
{
echo $name . "-" . $value . "-" . $dataType . "<br />";
echo '<br />';
and
public function execute()
{
print_r($this->_params);
echo '<br />';
echo $this->getText() . '<br />';
echo '<br />';
And got the following results:
:CHAVE-1-
:DESCRICAO-11-
:PRECO-1-
:DATE_TIME-09/07/2009 09:58:31-
Array ( )
INSERT INTO SERVICO (CHAVE, DESCRICAO, PRECO, DATE_TIME) VALUES (:CHAVE, :DESCRICAO, :PRECO, :DATE_TIME) RETURNING CHAVE INTO :RETURN_ID
It seems ok for me: but does not work !
The other 2 tables, with VARCHAR and DATETIME fields do work fine.
Thanks