Welcome Guest, Not a member yet? Register   Sign In
help, add_column can't work. DB: sql express 2008
#1

[eluser]Unknown[/eluser]
HI
I find a problem,If background db is sql express 2008, the add_column will thread a error.
I don't sure that It's a bug.who can help me .thanks a lot.

Error Number: 42000
[Microsoft][SQL Server Native Client 10.0][SQL Server]column 'Array' must include datatype.
ALTER TABLE users ADD Array NOT NULL
Filename: C:\\website\\apache\\htdocs\\CodeIgniter_2\\system\\database\\DB_driver.php
Line Number: 330

controller as follows:

public function index()
{
$this->output->enable_profiler();
$this->load->database();
$this->load->dbforge();

$fields = array(
'user_id' => array(
'type' => 'INT'
),
'username' => array(
'type' => 'TEXT',
)
);
$this->dbforge->add_field($fields);
$this->dbforge->add_key('user_id', TRUE);
$this->dbforge->create_table('users');

$f = array(
'bio' => array('type' => 'TEXT')
);
$this->dbforge->add_column('users', $f);

$this->dbforge->drop_column('users', 'bio');

$f = array(
'status' => array('type' => 'BOOLEAN')
);
$this->dbforge->add_column('users', $f);
}


Messages In This Thread
help, add_column can't work. DB: sql express 2008 - by El Forum - 04-15-2013, 07:29 AM
help, add_column can't work. DB: sql express 2008 - by El Forum - 04-15-2013, 08:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB