Uncaught Error: Call to a member function Execute()

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mofaco
User
Posts: 1

Uncaught Error: Call to a member function Execute()

Post by mofaco »

Hi
After After Change Collation To Persian_100_CI_AS In Sql Server 2014
Display Error:
Fatal error: Uncaught Error: Call to a member function Execute() on boolean in C:\xampp\htdocs\dd\adodb5\drivers\adodb-ado5.inc.php:280 Stack trace: #0 C:\xampp\htdocs\dd\adodb5\adodb.inc.php(1251): ADODB_ado->query('SET DATEFORMAT ...', false) #1 C:\xampp\htdocs\dd\adodb5\adodb.inc.php(1229): ADOConnection->Execute('SET DATEFORMAT ...', false) #2 C:\xampp\htdocs\dd\phpfn13.php(4562): ADOConnection->Execute('SET DATEFORMAT ...') #3 C:\xampp\htdocs\dd\phpfn13.php(4430): ew_ConnectDb(Array) #4 C:\xampp\htdocs\dd\phpfn13.php(4471): Conn('DB') #5 C:\xampp\htdocs\dd\Plan_Customerlist.php(300): ew_Connect('DB') #6 C:\xampp\htdocs\dd\Plan_Customerlist.php(1961): cPlan_Customer_list->__construct() #7 {main} thrown in C:\xampp\htdocs\dd\adodb5\drivers\adodb-ado5.inc.php on line 280


ltt1972
User
Posts: 1

Post by ltt1972 »

Can someone point out what the issue might be? Please see error message below. I'm using Windows Server 2012, IIS 8, PHP 7, and MSSQL 2012. The native client is installed on the web server and the PHP com_net.dll is installed.

Error:
Fatal error: Uncaught Error: Call to a member function Execute() on boolean in C:\inetpub\wwwroot_test\ops-app\adodb5\drivers\adodb-ado5.inc.php:280 Stack trace: #0 C:\inetpub\wwwroot_test\ops-app\adodb5\adodb.inc.php(1251): ADODB_ado->query('SET DATEFORMAT ...', false) #1 C:\inetpub\wwwroot_test\ops-app\adodb5\adodb.inc.php(1229): ADOConnection->Execute('SET DATEFORMAT ...', false) #2 C:\inetpub\wwwroot_test\ops-app\phpfn13.php(4563): ADOConnection->Execute('SET DATEFORMAT ...') #3 C:\inetpub\wwwroot_test\ops-app\phpfn13.php(4431): ew_ConnectDb(Array) #4 C:\inetpub\wwwroot_test\ops-app\phpfn13.php(4472): Conn(0) #5 C:\inetpub\wwwroot_test\ops-app\index.php(194): ew_Connect() #6 C:\inetpub\wwwroot_test\ops-app\index.php(293): cdefault->__construct() #7 {main} thrown in C:\inetpub\wwwroot_test\ops-app\adodb5\drivers\adodb-ado5.inc.php on line 280


Webmaster
User
Posts: 9427

Post by Webmaster »

If you use some special collations (e.g. Persian_100_CI_AS) and have enabled Debug (Click Tools -> Advanced Settings, enable Debug, re-generate ewcfg*.php, run scripts again), you should see the following error from MSSQL:

"Provider=SQLNCLI11;Persist Security Info=False;Data Source=xxx\xxx;Initial Catalog=xxx;User Id=xxx;Password=xxx;DataTypeCompatibility=80
com_exception: Source: Microsoft SQL Server Native Client 11.0
Description: The USE database statement failed because the database collation Persian_100_CI_AS is not recognized by older client drivers. Try upgrading the client operating system or applying a service update to the database client software, or use a different collation. See SQL Server Books Online for more information on changing collations. in xxx\drivers\adodb-ado5.inc.php:116"

If you must use that collation and you don't use those new SQL Server 2008 (or later) data types (e.g. varchar(max), nvarchar(max), datetime2, time, etc.), you can remove "DataTypeCompatibility=80" from the connection string generated in ewcfg14.php, or you can use Database_Connecting server event (see Server Events and Client Scripts in the help file) to remove it.


Post Reply