Home arrow Ondersteuning arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Problem with connecting to mssql database (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Problem with connecting to mssql database
#17662
tashagooch (User)
Fresh Lemon
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Problem with connecting to mssql database 3 Months, 1 Week ago Karma: 0  
It appears that the config parameter databaseport isn't being used for databasetype = 'odbc_mssql'. I changed line 121 of limesurvey/common.php to this:
Code:


case "odbc_mssql": $dbport="Driver={SQL Server};Server=$databaselocation,$databaseport;Database=".$databasename;


from this:
Code:


case "odbc_mssql": $dbport="Driver={SQL Server};Server=$databaselocation;Database=".$databasename;


and it is now working. (I am using LimeSurvey 1.71 .) I don't know whether or not this is the best fix - I'm not proficient in PHP.
 
Logged Logged  
  The administrator has disabled public write access.
#20146
Vinothbabu (User)
Fresh Lemon
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:Problem with connecting to mssql database 1 Month ago Karma: 0  
You have just removed the databaseport parameter and i don't see any other change in your code.

Moreover if the parameter is not used, then its not going to be issue whether its present or not. The either of code is valid.
 
Logged Logged  
 
Regards
Vinothbabu
www.vinothbabu.com
  The administrator has disabled public write access.
#20167
tashagooch (User)
Fresh Lemon
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Problem with connecting to mssql database 1 Month ago Karma: 0  
I guess I don't understand what you are saying.

My first code block shows how I inserted "$databaseport" into the code.
The second block of code is the original block of code from Limesurvey and it doesn't reference "$databaseport".

In other words, I changed "Server=$databaselocation;" to "Server=$databaselocation,$databaseport;"
in order to connect to mssql.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top