SC project on XAMPP or UniformServer with MS SQL database

Hi,

i have a project with a simple grid thats connect to a MS SQL server. In SC that works without any problem. Now i’am deploy this project to a (local) XAMPP or UniformServer.

My grid starts and displays the first records. But when i use the quick search or go to next page this error occurs:

SQLState: 28000
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server][Login error for user ‘sa’].

I don’t understand why the grid starts without problems and then crashed with this message … Does anyone have an idea?

I run my SC production on uniform and we have no issues at all, but we run MySQL. Since you are using ODBC you might be able to look at the odbc logs and debug from there. Is the user sa known? It looks like the session is corrupted.

I’am not use the ODBC-Driver, but the MS SQL Native Driver PDO (look at: http://www.scriptcase.net/docs/en_us/connecting-your-database/sql-server/ms-sql-server-native-srv-pdo)

The strange this is: the simple grid works with this driver in SC. The i export the app and put now this at wwwroot from SC. And the above login error appears …

Whats the heck is the difference if the app running in SC direct or at the same wwwroot?

Just to throw ideas. PHP version maybe?

The errormessage contains ODBC information, so appearantly odbc is used. Not sure why. Do you have other connection options like pdo to try? In Mysql you can choose from pdo, transactional, non transactional. I don’t know regarding SQL Server. At the university running on Windows 2012 server we have Uniform running SC8 and it connects to a SQL server database w.o. problems, but I have no insight. ‘rr’ you?

Thats simple: the pdo drivers for php 5.5 from microsoft uses the odbc driver from microsoft in the background. The pdo drivers for php 5.4 from microsoft uses the native client from microsoft or the odbc driver from microsoft.

I have all combinations tested, but the sc app is not running via xampp or Uniform Server. A simple test.php works in all variants … I do not understand, that the app start is ok, but not clicking on the next page etc. I would argue that it’s a bug in SC …

Are you sure that you use the correct username? It may be that it needs the domain name with it as well… Since it is microsoft. The same username without a domain is not the same as the username with a domain (unless the it is on the same computer and the default domain is set and so on).
So DOMAIN\MeMySelfAndI is not MeMySelfAndI on my own machine.

Anyway pdo does work on windows but you need to download the proper version. Did you try with this one: http://www.microsoft.com/en-us/download/details.aspx?id=36434 and are you aware that the 32 bit driver and the 64 bit driver are installed on the same machine? You have to use the 32 bits odbc driver for scriptcase use which is in the syswow64 dir in the windows dir (ODBCADM something.exe as far as I recall).

That has nothing to do with the username … I’am use the sql server login, not the windows login. “sa” is the database administrator for ms sql servers. Other user don’t work …

The proper odbc version (x64) is installed. I can’t install the x86 version on a 64 bit Win7. But understand, that for the pdo connection the odbc configuration do not care. The pdo driver uses routines from the odbc driver, but a odbc configuration is not needed … The way is:

SC: MSSQL Server NATIVE SERVER PDO => PHP (5.4): php_pdo_sqlsrv_54_ts.dll (Microsoft Drivers 3.0 for PHP for SQL Server in XAMPP) => SQL Server 2012 Native Client (Windows) => MS SQL Server

But this way don’t fully work.

This work:
Test.php (not SC) => PHP (5.4): php_pdo_sqlsrv_54_ts.dll (Microsoft Drivers 3.0 for PHP for SQL Server in XAMPP) => SQL Server 2012 Native Client (Windows) => MS SQL Server

In my view: bug in SC …

Aargh …! I have tested with .27, that don’t work. Now i have make a new deploy with .28 and that runs …

To early happy …

I have deinstalled XAMPP and the drivers listed above, reinstalled all in order to document everything clean but the problem in post #1 occurs. A simple test.php runs fine, but not the sc app.

[QUOTE=RHS;31765]To early happy …

I have deinstalled XAMPP and the drivers listed above, reinstalled all in order to document everything clean but the problem in post #1 occurs. A simple test.php runs fine, but not the sc app.[/QUOTE]

I asume that you have checked the compatibility between the current SQL Server version and Scriptcase. I guess that you have some kind of compatibility issue here. I don’t know how complex it is, but to check you could consider moving it to MySQL and see if the problem persists.

No chance, the “master” db for our ERP system is on MSSQL … and thats is good.

But I’am not understand that the connection test with nm_ini_manager.php is fully ok, but not the app that uses this connection … that’s totally illogical.

I agree, but I have realy no idea what’s going on. Can you debug to the point where it’s failing? I.e. using XDebug?

Did you use this one: http://sqlsrvphp.codeplex.com/releases/view/85767 ?? I dont have mssql here so I cant test it.

Yes, but from MS direct: http://www.microsoft.com/en-us/download/details.aspx?id=20098

First, create a new database for your website by going to phpadmin . Create a new database 350-001 pdf dumps and add new -you with a new name and a password (the name is not root). Give yourself all the privileges .

I think, I have the problem now solved …

That’s not a problem with MSSQL or the drivers but a problem with the connection handling in SC. My grid is exported from a big project with many connections to MSSQL- and MySQL-Servers. I have the app exported, created a new project and imported the grid.

The database connection page show two connections. One to my MSSQL-Server and another to a MySQL-Server. I delete the last connection (MySQL) …

In SC the app is running fine. Then i make a full deploy and wondered that the deleted connection should by edited. If i do that, my grid is running fine under XAMPP although the connection (MySQL) is not needed.

But if I delete the redundant connection, then told me SC something of errors in MSSQL (see post #1). Here probably seems some to be wrong with the error handling in SC … => Bug!

Questions: how can I delete a redundant connection in a SC project?