Does anyone have an example of connecting DataTables to Oracle for server-side processing. I have been trying to convert the MySQL example to Oracle without much success. TIA.
I'm afraid that I don't, but just wanted to add a quick message to say that if anyone has got such a script, it would be a great addition to the server-side processing scripts which we already have ( http://datatables.net/development/server-side/ )!
Hey there pspence.
I wrote an example based on one of the server-side processing scripts which Allan already has.
It is written in php, made for an Oracle 10g via OCI8.
unfortunately I currently don't have any php server with an Oracle based db.
Can you (possibaly through Allan) give me access to your server in order for me to test and debug my code?
Hey Big-deal, unfortunately I do not have a publicly available instance of Oracle. I could try to test the code for you, if Allan sends it to me. Or, there is a 'free' version of Oracle called Oracle XE which is basically oracle 10g with some memory limitations. Thanks for your efforts on this. I think that it will be a great addition to this already great plugin.
I'll send you the source code for you to test.
I will try to help you to get it to work if it doesn't work...
Where to send it to? it is not yet ready to be published here...(:
Well just for the record - I wrote the example and sent it to you.
If you are having problems (because it is not yet tested) - let me know and I will try to help.
When the example is complete please let me know so we will send it to Allan to publish along side with all other server side examples.
Hi big-deal
I wanted to achieve the same thing and have oracle and data table setup with me,can you please send the code to saychinu@gmail.com.Will test the code and let you know in case of any issues :)
thanks !
The code was sent to you too chinu. please tell me of any problems - I'll try to work them out with you.
pspence - I havn't got any word from you yet - how are you doing?
Hello there,
got the same problem. I have to use several hundred records query results to display on the table. I'm newbie with data tables and I will appreciate a lot your example.
Sorry I have lost this thread. I have been out of commission with a medical issue. Has chinu's code been posted? If not I will continue to test and refine the code. TIA.
Here we go: http://datatables.net/development/server-side/php_oracle - big-deal sent the code over to me a few days ago and I've posted it up in the server-side scripts gallery. Let us know how you get on!
Hi all,
can you guys help me please?
I've tried using the php_oracle code and rename it as server_oracle.php and create oracle.html to display the result. Unfortunately when I tried to run it in my localhost it only succeed connecting to my oracle 11G database, displaying database record, and sorting each table, but when I started to type in the search field, suddenly an error appeared : "JSON data from server could not be parsed. This is caused by a JSON formatting error."
when I execute the server_oracle.php file there are bunch of error warnings:
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 233
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 234
Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 260
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 262
Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 281
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 284
{"sEcho":0,"iTotalRecords":"92036","iTotalDisplayRecords":0,"aaData":[]}
===================================
By the way, how to create multi_filter in server-side/php_oracle like in datatables/examples/api/multi_filter.html
my php version: 5.2.9
Database: Oracle 11G
thanks for the post!!!
I find some very useful oracle example here http://www.php-example.com/2011/06/28-basic-tutorials-to-learn-oracle.html which helps me to learn oracle by ready made sql code examples.
reading the code posted at http://datatables.net/development/server-side/php_oracle I'm trying to "translate" it to JSP (I know that already exists an example with JSP, but it use MySQL)
I have reached a couple of lines where or I missed something or is dead code what I reading. The lines I talking about are:
[code]
//Bind all variables of general search
for ( $i = 0 ; $i < $nWhereGenearalCount ; $i++ )
{
oci_bind_by_name($statmntFinal, ':whereParam'.$i , $sWhereGenearal);
oci_bind_by_name($statmntFinalCount, ':whereParam'.$i , $sWhereGenearal);
}
[/code]
I can't find in the code a reference to the ":whereParam" string except by that I see above. I have few or null experience with PHP, so I asking here for someone with more experience to clarify if this is an error, omission or really I missing something.
Any help will be welcome
PS: sorry by my horrible english...is not my native language
Finally I have rewrited the example in java, in a servlet more exactly. I have create a web app file, so if someone need and example of Datatables that works with Oracle and with a servlet download this file and play with it:
Replies
Allan
What platform do you wish to use? jee (java - jsp)? php?
Do you want to connect from php to an oracle db?
p.s.
What version of oracle db? 10g? 11g?
I wrote an example based on one of the server-side processing scripts which Allan already has.
It is written in php, made for an Oracle 10g via OCI8.
unfortunately I currently don't have any php server with an Oracle based db.
Can you (possibaly through Allan) give me access to your server in order for me to test and debug my code?
big-deal
http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
I will try to help you to get it to work if it doesn't work...
Where to send it to? it is not yet ready to be published here...(:
If you are having problems (because it is not yet tested) - let me know and I will try to help.
When the example is complete please let me know so we will send it to Allan to publish along side with all other server side examples.
big-deal
I wanted to achieve the same thing and have oracle and data table setup with me,can you please send the code to saychinu@gmail.com.Will test the code and let you know in case of any issues :)
thanks !
pspence - I havn't got any word from you yet - how are you doing?
big-deal
Allan, where do you want me to send you the example file?
big-deal
Thanks,
Allan
got the same problem. I have to use several hundred records query results to display on the table. I'm newbie with data tables and I will appreciate a lot your example.
where should i find the code?
Thanks for the code big-deal :-)
Regards,
Allan
can you guys help me please?
I've tried using the php_oracle code and rename it as server_oracle.php and create oracle.html to display the result. Unfortunately when I tried to run it in my localhost it only succeed connecting to my oracle 11G database, displaying database record, and sorting each table, but when I started to type in the search field, suddenly an error appeared : "JSON data from server could not be parsed. This is caused by a JSON formatting error."
when I execute the server_oracle.php file there are bunch of error warnings:
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 233
Warning: oci_bind_by_name() [function.oci-bind-by-name]: ORA-01036: illegal variable name/number in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 234
Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 260
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 262
Warning: oci_execute() [function.oci-execute]: ORA-30485: missing ORDER BY expression in the window specification in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 281
Warning: oci_fetch_array() [function.oci-fetch-array]: ORA-24374: define not done before fetch or execute and fetch in C:\xampp\htdocs\datatables\examples\server_side\scripts\server_oracle.php on line 284
{"sEcho":0,"iTotalRecords":"92036","iTotalDisplayRecords":0,"aaData":[]}
===================================
By the way, how to create multi_filter in server-side/php_oracle like in datatables/examples/api/multi_filter.html
my php version: 5.2.9
Database: Oracle 11G
Many many thanks for your help!! :)
Best regards,
Dar
I find some very useful oracle example here http://www.php-example.com/2011/06/28-basic-tutorials-to-learn-oracle.html which helps me to learn oracle by ready made sql code examples.
reading the code posted at http://datatables.net/development/server-side/php_oracle I'm trying to "translate" it to JSP (I know that already exists an example with JSP, but it use MySQL)
I have reached a couple of lines where or I missed something or is dead code what I reading. The lines I talking about are:
[code]
//Bind all variables of general search
for ( $i = 0 ; $i < $nWhereGenearalCount ; $i++ )
{
oci_bind_by_name($statmntFinal, ':whereParam'.$i , $sWhereGenearal);
oci_bind_by_name($statmntFinalCount, ':whereParam'.$i , $sWhereGenearal);
}
[/code]
I can't find in the code a reference to the ":whereParam" string except by that I see above. I have few or null experience with PHP, so I asking here for someone with more experience to clarify if this is an error, omission or really I missing something.
Any help will be welcome
PS: sorry by my horrible english...is not my native language
Finally I have rewrited the example in java, in a servlet more exactly. I have create a web app file, so if someone need and example of Datatables that works with Oracle and with a servlet download this file and play with it:
https://sites.google.com/site/cargoarea/devel/Datatables_AJAX_With_Oracle.war
You need a servlet container (Apache Tomcat i.e) and the Oracle jdbc driver "installed" (ojdbc14.jar) on it.
The code is inside of the war file, can be reused and posted in the datatables site if this can help to someone else.
Greetings from Argentina.
P.S: sorry by my horrible english...is not my native language