![]() |
|
|||||||
| Javascript and Ajax Questions and information about working with Ajax and Javascript in Delphi for PHP. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
I've got a new database problem, when i try to use Ajax Example with my database (MSSQL), I've got huge javascript error with some MySql error (and i never use mysql in my code) this is the example : function Button1Click($sender, $params) { $this->Button1->Caption="clicked Ajax ".date("Y-m-d H:i:s"); $this->Label1->Caption="Hello from Ajax!! ".date("Y-m-d H:i:s"); $this->Label1->Color="#".dechex(rand(0,0xFFFFFF)); } function Button1JSClick($sender, $params) { //Dump the call using Ajax to the Button1Click event echo $this->Button1->ajaxCall("Button1Click"); ?> //Return false to prevent the button submit the form return(false); <?php So, i've install a MySql database to test, and it work, i conclude that I cannot use Ajax with MSSQL Database, is it true ? |
| Sponsored Links |
|
|
|
|||
|
I'm not that sure, have a look, this example is really basic, nothing else on the code :
First i try with my MySQL Database and the Label/Button : ![]() Second time i drop my MSSQL Database : ![]() And then, huge error : ![]() So it must be a Ajax database option or something else? |
|
||||
|
Use firebug in firefox and you can get at the entire response code. Look through the response and somewhere farther down you will see something that looks abnormal ( it will be the standard error output) That will tell you what is going wrong.
Xajax pops that error whenever there is 'junk' in the response. |
|
|||
|
Firebug tell me the same error :
Mon Mar 23 2009 08:33:19 GMT+0100: Received: <br /> <b>Warning</b>: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to MySQL server on 'server_sql2' (10061) [...] I don't understand why Delphi will connect me on a MySQL Database while I don't use any component MySQL ... Is there a Framework to install for it works good ? All people don't work with MySQL... Edit: I try to run the AjaxDatabase with my database, and it's work for the first time, the data change good, and when i change row for a second time, it call a MySQL function... don't understand... Last edited by Lucas.frey; 23rd March 2009 at 09:41. |