473,378 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

access CLOB data in a DB thru JAVASCRIPT

how to access the clob data that is present in a Database through javascript function.?
The scenario is if i click a link then it should throw a pop up screen with the clob files that are present in the particular DB. i need to write it as a function.

Thanks in Advance
Thinnappan M
Sep 25 '13 #1
4 2112
Dormilich
8,658 Expert Mod 8TB
which DB are you using?
Sep 25 '13 #2
thanks for ur reply,

i need to create a standalone function. so imagine i just have a seperate oracle database in which clob datas are present. so if i click that link the clob files that are present in the DB should be displayed as a pop-up
Sep 25 '13 #3
Dormilich
8,658 Expert Mod 8TB
simplified spoken, you need to write an API Adapter using AJAX.

reason: your DB is on the server and hence your client-side JavaScript cannot establish a connection. You have to make JavaScript to connect to your server-side language (via XmlHttpRequest) and call a script (the script is your API*) there that executes the desired DB operation and returns the result to JavaScript.
Expand|Select|Wrap|Line Numbers
  1. +----------------+
  2. | browser        |
  3. | +------------+ |
  4. | | JavaScript | |
  5. | +------------+ |
  6. |        |  A    |
  7. +--------|--|----+
  8.          |  |
  9.          |  |
  10.       (Internet)
  11.          |  |
  12.          |  |
  13. +--------|--|----+
  14. | server V  |    |
  15. | +------------+ |
  16. | | PHP script | |
  17. | +------------+ |
  18. |      |  A      |
  19. |      |  |      |
  20. |      V  |      |
  21. | +------------+ |
  22. | | Oracle     | |
  23. | +------------+ |
  24. +----------------+
  25.  
note, PHP is just an example for a server-side language

* - of course you could also expose your server-side API also through SOAP or a RESTful WebService (but that still requires a server-side language, you don’t interact directly, though)
Sep 25 '13 #4
Dormilich
8,658 Expert Mod 8TB
though ... you could also try to make a direct socket connection with the DB, although that requires 1) the DB to actually allow that and 2) you need to know the correct socket commands to make the DB correctly answer.

if you ask me, the other way is far easier.
Sep 25 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Neo | last post by:
can anybody help me in writing a javascript function which opens a popup window with the target URL when the link "POST Request" is clicked.. Points to note: The HTML DOESNT and SHOULDNT...
4
by: Lefteris | last post by:
Hi, I am trying to write a simple application in javascript that automatically fills the fields of a form in a page at another domain. I display the foreign domain page on a frame and have the...
2
by: beena | last post by:
We have a mainframe DB2 table with CLOB data type... What's the best way to transfer CLOB data from os/390 DB2 to UDB (8.2) on AIX 5.2. We tried unloading data with fixed format and tried...
1
by: pankaj_wolfhunter | last post by:
I have a table with a clob column with 10 records and each record is around 1MB. I just want to know is there any way that i can export or send this clob data of each record into separate file....
0
by: Jimm | last post by:
Can anyone advise me as to the best method for updating an Oracle CLOB data type. I have to update a single column of CLOB data type via a web service. Thank you in advance. Jimm.
0
by: Jimm | last post by:
Can anyone advise me as to the best method for updating an Oracle CLOB data type. I have to update a single column of CLOB data type via a web service. Thank you in advance. Jimm.
2
by: jason.tadeo | last post by:
I was wondering if there was away beside ajaxs where when i first load the page i could access php and get all the data i needed and input into a varable which would not be a php one but a...
38
by: kanthi84 | last post by:
Hiiiiii i am having a table in oracle. in that table one of the column is to store clob data. and in that clob column, the data is inserted like the following using separators kanthi~is a...
1
by: vtang | last post by:
Is there a way using PL/SQL script to update the time stamp of a CLOB data in a table? Basically we can download the CLOB file to local and update the content with new time stamp.
0
by: pthai | last post by:
Discover worksheet only retrieved up to 32K characters for my discover worksheet that it pulls data from a clob data column value. I am new to discover plus. Any help would be appreciate. Thanks....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.