$db->db_now and MSSQL

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

Locked
0_o
TestLink user
Posts: 12
Joined: Fri Aug 07, 2009 1:56 pm

$db->db_now and MSSQL

Post by 0_o »

Hi!

We using Testlink+MSSQL.

We have installed testlink in the begining of this month. Everything was fine until 13 November. Since 13 nobody can create new test case. Testlink just did nothing and returns empty white screen.

After few hours of researching this problem I found out that problem is in SQL query. SQL query contains invalid date format in creation_ts field. The only one solution that I found is to modify db_now function of database class as follows:

Code: Select all


	function db_now()
	{
	    switch($this->db->databaseType)
    	{
      		case 'mssql':
				return "GETDATE()";
		default:
				return $this->db->DBTimeStamp(time());
		}
	}

Since that, all works fine!

Hope you will add this fix in next Testlink build.
Amaradana
Member of TestLink Community
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am
Contact:

Post by Amaradana »

Even I am facing same Problem, But your solution did not solve my problem.
Thanks,
TesterWorld
Http://amartester.blogspot.com
0_o
TestLink user
Posts: 12
Joined: Fri Aug 07, 2009 1:56 pm

Post by 0_o »

Amaradana wrote:Even I am facing same Problem, But your solution did not solve my problem.
If you have the same problem with dates, you can try else to add:

Code: Select all


      		case 'odbc_mssql':
				return "GETDATE()";
                case 'adodb_mssql':
				return "GETDATE()";
                case 'mssql_n':
				return "GETDATE()";

in the same function. Maybe it can help.
Amaradana
Member of TestLink Community
Posts: 398
Joined: Mon Feb 16, 2009 11:19 am
Contact:

Post by Amaradana »

I doesn't know the problem, why it is causing, but i am facing same problem.
Thanks,
TesterWorld
Http://amartester.blogspot.com
Locked