Table "table_Name" Does Not Exist In Model Generator Using Sql Server 2005

hi there…

i’m using PHP.5.2.5



db sql server management studio express 2005 in different machine -> using windows server with ip

and my xampp installation use ip

when i migration,the output is running well…the table was auto create in db ebudget (tbl_invest)



so i think, i successful to connect my yii with sqlserver 2005

this is the db code both config\console.php -> to migrate and config\main.php -> to generate gii



			'connectionString' => 'sqlsrv:server=;database=ebudget',

			'username' => 'sa',

			'password' => 'xxx',




			'connectionString' => 'sqlsrv:server=;database=ebudget',

			'username' => 'sa',

			'password' => 'xxx',


but when i want to generate model,the error looks like this

[color="#FF0000"]table tbl_invest does not exist[/color]



so ,what should i do to correct this problem???

i hope anyone can help me,thank you :)




is there any body can help my problem??

i hope some one can help me :unsure:

Hello redyopante,

Can you please check the below mention parameters in phpinfo(), if following parameters are set then your connection should work

  1. Php Registered Stream should have sqlsrv

  2. Under Apache Environment-> PATH -> its should have the environment variable or path of SQL Server 2005 installation

  3. Under PDO Section -> POD driver should contain sqlsrv

  4. pdo_sqlsrv should be enabled

  5. sqlsrv support should be enabled

Also check if you have installed Sql Server 2005 Native Client, If not then you can download it from Microsoft website

Also Please find below the procedure to check whether SQLSRV is working fine or you have complete installation of sqlsrv DLL files or not

  1. Check if the extension for MsSql exist in your "ext" folder of php installation, if not then kindly search for "Microsoft Drivers 3.0 for PHP for SQL Server" and download it from Microsoft website

  2. Download SQLSRV30.EXE for PHP 5.3.6 or PHP 5.4.


Download SQLSRV20.EXE for PHP < PHP 5.3.6.

and then load the DLL files after running this exe file into the "ext" folder of php installation by setting installing path popped up during installation.

  1. After this, install Microsoft SQL Server 2005 Native Client available in the available on microsoft website after searching "SQL Server 2005 Feature Pack"

  2. Restart the Microsoft SQL Server 2005

As this is my first post on YII, I am not able to share direct links so I’m sharing the keywords to search on google for Drivers and Native Clients of SQL Server


Thanks & Regards

Ravi Madan

[size=2]Thank you for your advise Ravi Madan,. [/size]:rolleyes:

Now i can connect my yii with sql server 2005, also can create model generator without error,.but i changed the location of db server,. from ip PC that is install windows server) into PC1111\SQLEXPRESS(localhost).

this is my step

  1. copy file php_sqlsrv_52_ts_vc6.dll & php_pdo_sqlsrv_52_ts_vc6.dll into xampp\php\ext

  2. add this script under file php.ini -> xampp\apache\php.ini





  1. Download & install Microsoft SQL Server 2008 R2 Native Client, i choose x64 because i use 32 bit OS

sql server 2008 R2 native client

  1. and this is my connection script both in protected\config\main.php and protected\config\console.php


			'connectionString' => 'sqlsrv:server=PC1111\SQLEXPRESS;database=ebudget',

			'username' => 'sa',

			'password' => 'P@ssw0rD',