Cdbcommand Failed To Execute The Sql Statement


getting error after click on model generator in gii even database and rest of things are ok

CDbCommand failed to execute the SQL statement: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. The SQL statement executed was: SHOW TABLES

Thanks in Advance.