DB connection to MSSQL Server fails!!

Dear all,

I have the SC version 9.0.004 and created a project with 16 applications. It works fine with the local “MySQL” database. Now I would like to run the same application with accordings database and tables/views on a MicroSoftSQL-DB (SQL Server 2008 R2). What I tried:

  • I installed all needed Microsoft ODBC Driver 11 for SQL Server from the Microsoft-Website:
    >> php_pdo_sqlsrv*.dll
    >> php_sqlsrv_7_*.dll

  • I copied them all into the folder C:\Program Files\NetMake\v9\components\php\ext

  • I edit the php.ini file in the folder C:\Program Files\NetMake\v9\components\php where I added the severel extensions
    >> extension=php_pdo_sqlsrv_7_nts_x64.dll
    >> extension=php_sqlsrv_7_nts_x64.dll
    >> extension=php_pdo_sqlsrv_7_ts_x64.dll
    >> extension=php_pdo_sqlsrv_7_ts_x86.dll>> extension=php_sqlsrv_7_nts_x64.dll
    >> extension=php_sqlsrv_7_nts_x86.dll
    >> extension=php_sqlsrv_7_ts_x64.dll
    >> extension=php_sqlsrv_7_ts_x86.dll

  • I set the correct extension path in php.ini to the folder where the dll’s are copied in:
    >> extension_dir = “C:/Program Files/NetMake/v9/components/php/ext”

  • I restart the apache server via SC Apache Service Monitor

  • I started SC again and created a new blank project in SC with database connection MSSQL

  • The MSSQL server is in the same VLAN segment like my development PC so I can create a database connection without any problem with an other DB connect tool to the desired DB and the tables, BUT:

  • If I choose in SC “MSSQL Server Native SRV” I get the error message:
    >> Connection Error
    >> SQLState: IMSSP
    >> Error Code: -49
    >> Message: This extension requires the Microsoft ODBC Driver 11 or 13 for SQL Server. Access the following URL to download the ODBC Driver 11 or 13 for SQL Server for x64: >> http://go.microsoft.com/fwlink/?LinkId=163712

  • If I choose “MSSQL Server Native SRV PDO”
    >> Connection Error
    >> Connection attempt failed: SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver 11 for SQL Server to communic …

  • In case of “MSSQL Server”
    >> The extension is not loaded on the php.ini file.
    >> Click on the help icon for more informations.

What do I do wrong? ANY TIPS AND HINTS FOR ME?

Kind regards,
bysystem

I cannot get a connection to SQL Server to work. I think it is because I am new to Scriptcase and they make it very awkward for newbies to use SQLServer databases. The Scriptcase reference for a SQL_PHP driver is old and only supports PHP prior to version 5. I have found some on Github which support PHP 7.1.

In my opinion Scriptcase does not support SQLServer. You have to hunt around to find drivers, manually configure .ini files and hack it together to work. I hope it is only because I am new to scriptcase but at this point I am very disappointed.

Dear Scriptcase,

I am of the same situation as the users above and consider that MSSQL integration is quite low on your list of priorities. Since upgrading to Scriptcase 9, it is a total headache as indicated by bysystem.

Would appreciate some support for our database platform!

I got mine working under IIS. Easiest is doing things on same architecture. Meaning if your OS server is 64bit, run php7 in 64bit, install 64bit mssql driver. If necessary, create DSN on 64bit also… check phpinfo and find out if all are the same.

What type of connection are you using to connect to MSSQL server?

All types are working if you are working on regular tables only. But if you deal with dataviews which I do, I dont know why, but it only works if the connection is MSSQL Server Native SRV PDO.

You shouldn’t have problem with the development. Problem mostly shows up on the production. You should also deploy all lib to update your production dlls if you were from sc8 to sc9.
Since you said you upgraded to sc9, chances are your php on server is still 5.6 w/c is generally 32bit.

If this is your case, you’ll need to install php7 side by side and use the 64bit on this website. Remember that sc9 is running already on php7. I think its better to run the generated applications on the same.