The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
MS SQL for User Spice? - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: MS SQL for User Spice? (/showthread.php?tid=221)



MS SQL for User Spice? - Angel - 08-24-2016

Hi guys,

I'm trying to implement User Spice for a webpage that is using MS SQL to store data. I'm wondering if it is possible to use User Spice with MS SQL?

Thanks!


MS SQL for User Spice? - mudmin - 08-29-2016

Hi...I'm sorry I missed this question. It SHOULD be possible to use UserSpice with Ms SQL, although I haven't tried it.

UserSpice is written with all the DB connections running through PDO. The great thing about that is that PDO abstracts the database calls and essentially makes them pretty universal. That said, there might be something special that you have to do to make the initial connection. When I look at
http://php.net/manual/en/ref.pdo-dblib.php I see it talking about port numbers etc. I wonder if you just need to do a little more configuration.


MS SQL for User Spice? - Angel - 09-06-2016

Hi Mudmin,

Thank you very much for the reply! I'm thinking of replacing the mysqli connection in userspice with the code below. Is there anything else I need to do in order not to break anything?

$serverName = "serverName\sqlexpress"; //serverName\instanceName

// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"dbName");
$conn = sqlsrv_connect( $serverName, $connectionInfo);


Thanks a lot!
Angel