hi, i have a problem, i’m using dhtmlxScheduler, with SQL Server 2005. I can show data and work fine in Internet Explorer 7, all is correct, but in Firefox 3.6.11 and Google Chrome, show this error:
please, help me, Thanks
hi, i have a problem, i’m using dhtmlxScheduler, with SQL Server 2005. I can show data and work fine in Internet Explorer 7, all is correct, but in Firefox 3.6.11 and Google Chrome, show this error:
please, help me, Thanks
Hello,
Do you use some plugin or standalone version of scheduler?
If you are using plugin when please specify which one and it would be perfect if you could share link to the website.
Best regards,
Ilya
hi ILya, thanks for answer me, i’m using the Stand Alone Version is v.2.3 Standard Edition package full, i downloaded it from http://dhtmlx.com/docs//products/dhtmlxScheduler/license.shtml?gpl, maybe the problem is in SQL server, because in MySQL work it fine…the link of my website is interactivo.maristas.cl/Acti … irefox.php, and my MsSQL Implementatión in db_common.php is:
/*! MSSQL implementation of DataWrapper
**/
class MsSQLDBDataWrapper extends DBDataWrapper{
private $last_id=""; //!< ID of previously inserted record
private $insert_operation=false; //!< flag of insert operation
private $start_from=false; //!< index of start position
public function query($sql){
LogMaster::log($sql);
$res = mssql_query($sql,$this->connection);
if ($this->insert_operation){
$last = mssql_fetch_assoc($res);
$this->last_id = $last["dhx_id"];
mssql_free_result($res);
}
if ($this->start_from)
mssql_data_seek($res,$this->start_from);
return $res;
}
public function get_next($res){
return mssql_fetch_assoc($res);
}
protected function get_new_id(){
/*
MSSQL doesn't support identity or auto-increment fields
Insert SQL returns new ID value, which stored in last_id field
*/
return $this->last_id;
}
protected function insert_query($data,$request){
$sql = parent::insert_query($data,$request);
$this->insert_operation=true;
return $sql.";SELECT @@IDENTITY AS dhx_id";
}
protected function select_query($select,$from,$where,$sort,$start,$count){
session_start();
$Sigla=$_SESSION["Sigla"];
$where = "'".$Sigla."'";
$sql = "SELECT ".$select.",
CONVERT(varchar, Fecha_Hora_Inicio, 120) AS Fecha_Hora_Inicio,
CONVERT(varchar, Fecha_Hora_Final, 120) AS Fecha_Hora_Final FROM ".$from."
WHERE Sigla =".$where;
// El parametro 120 del CONVERT me convierte al formato que necesito para xml (ISO) YYYY-MM-DD HH:00
return $sql;
}
public function escape($data){
/*
there is no special escaping method for mssql - use common logic
*/
return str_replace("'","''",$data);
}
public function begin_transaction(){
$this->query("BEGIN TRAN");
}
}
Please help me please…Thanks
Hello,
[/code] ?
Are you sure it is in db_common.php? If so then please try re-download package from the site and replace all files.
header('Content-type: text/xml');
Best regards,
Ilya
thanks Ilya, yes i downloaded all files again, now i send you the files that i 'm using , my events.php doesn’t contains empty line before section <?php ... ?>, i’m sure. So, why in Internet Explorer 7 work it fine?, i don’t understand.
my events.php:
<?php
include ('../js/scheduler/codebase/connector/scheduler_connector.php');
include ('../Actividades/config.php');
$res=mssql_connect($server, $user, $pass, true);
mssql_select_db($db_name);
$scheduler = new schedulerConnector($res);
$scheduler->enable_log("../Actividades/log.txt",true);
$scheduler->render_table("Acts","Id","Fecha_Hora_Inicio,Fecha_Hora_Final,Nombre,Lugar,Sigla");
?>
Help me please i need run my aplication in Firefox and Google Chrome…many thanks
Best regards,
Mike
db_common.zip (7.11 KB)
scheduler_connector.zip (1.46 KB)
…and header(‘Content-type: text/xml’) appears in:
dataprocessor.php - line 213 : updated file
base_connector.php - line 38 : updated file
update.php - line 212 : updated file
i’m sending files
Best regards,
Mike
Content-type textxml.zip (11 KB)
Hello,
You should specify database type in connector constructor. To do it replace
$scheduler = new schedulerConnector($res);
with
$scheduler = new schedulerConnector($res, "MsSQL");
in your events.php file.
Best regards,
Ilya
Thanks Ilya, i replaced:
[code]<?php
include (’…/js/scheduler/codebase/connector/scheduler_connector.php’);
include (’…/Actividades/config.php’);
$res=mssql_connect($server, $user, $pass);
mssql_select_db($db_name);
$scheduler = new schedulerConnector($res, “MsSQL”);
$scheduler->enable_log("…/Actividades/log.txt",true);
$scheduler->render_table(“Acts”,“Id”,“Fecha_Hora_Inicio,Fecha_Hora_Final,Nombre,Lugar,Sigla”);
?>[/code]
but the problem continue…, Can I correct any more?
Thanks
Mike
error_reporting(E_ALL);
Is there any notices if you open it in the browser?
Best regards,
Ilya
Also it seems you have edited db_common.php file.
What for (probably there is better solution) and for test sake - try replacing it with the default one from the scheduler’s package available on the site.
Did you edit any other connectors files?
Best regards,
Ilya
Hi Ilya, Tanks,
[code]<?php
include (’…/js/scheduler/codebase/connector/scheduler_connector.php’);
include (’…/Actividades/config.php’);
$res=mssql_connect($server, $user, $pass);
mssql_select_db($db_name);
$scheduler = new schedulerConnector($res, “MsSQL”);
$scheduler->enable_log("…/Actividades/log.txt",true);
$scheduler->render_table(“Acts”,“Id”,“Fecha_Hora_Inicio,Fecha_Hora_Final,Nombre,Lugar,Sigla”);
error_reporting (E_ALL);
?>[/code]
but the problem continue…
My site is interactivo.maristas.cl/Actividades/base.php
In IE interactivo.maristas.cl/Acti … events.php if you open is correct:
[code]<?xml version="1.0" encoding="utf-8" ?>
Doesn’t work in IE and FF. Checkout:
<text><![CDATA[l�a]]></text><Lugar><![CDATA[a�o]]
Check that everything (DB, mssql server, web server, page itself) is using utf-8.
On the other hand: http://www.interactivo.maristas.cl/Actividades/baseFirefox.php
works just fine in IE and FF. I have created an event
Best regards,
Ilya
Thanks lya, but here no open, the UTF no is problem for me… ¿What version of FF do you use?. On the other hand: base.php anda baseFirefoxx is the same…please send your print screen of Firefox but i check all, but nothing. I can to create events in Firefox and chrome, no problem, the problem is show them. if you Load again my page please in FF and you see the error…
in IE, correct:
in FFand Chrome:
please check, thanks
best regards
Mike
I believe you have edited something and now we are back to the situation where xml is given as html, not xml.
Also try placing
[code]
[/code] to the top of the page, add doctype, change charset.For example:
[code]
[/code]Best regards, Ilya
i did the changes, but the problem continue Ilya
Best regards
mike
Works ok in IE, FF, Chrome. Check screenshot in the attachment.
Be sure to cleat all cache.
Best regards,
Ilya
Ilya, i resolved the problem, in the file base_conector.php in the line 22 was comment:
// $this->type = "xml";
I corrected like the original file:
$this->type = “xml”;
and work it!!
many Thanks,
best regards Ilya
Mike
I am glad this matter is resolved
Though note that this line is not commented in our scheduler package and even in the files you attached to your earlier post
Best regards,
Ilya