Multiple database connection problem with activerecord

Dear Team,

I connected multiple database with dynamically but model active record not working different database.Below my code

$originalDbConnection = Yii::app()->db;



		    $latin1DbConnection = Yii::createComponent(array(      


		        'connectionString' =>'mysql:host=' . $user_hostname . ';dbname=' . $database,

		        'emulatePrepare' => Yii::app()->db->emulatePrepare,

		        'username' => $username,

		        'password' => $password,

		        'charset' => 'latin1',




		    // Do the queries against the database


		    $model =Example::getLableName();




		        throw new CHttpException(404,'The requested page does not exist.');

		    return $model;

Above the code multiple database with custom sql query working fine…but model active record not working.Please anyone can help me…