Displaying SQL results in Web Pages from non-native DBs?

How do developers process the results from SQL queries fron  non-narive DBs? If Spry Data sets are the best approach do I save the  query as a .htnl file with the results formatted as an HTMLDataset or do  I save the SQL query as an XML file? What other options do I have?
TIA Ephraim.

Hi
You will require a database driver for PHP in order for it to communicate with your chosen database, you can find a list of supported drivers here - http://php.net/manual/en/pdo.drivers.php.
However this will require you to use PHP:PDO for the querys/inserts/updates etc, see - http://php.net/manual/en/book.pdo.php. PDO is supported by the zend framework or you can code your own by following the examples given in the php:pdo manual, (link above).
The good news is that by using pdo it is possible to use prepared statements and transactions if your database supports these. Prepared statements are the recommended method of issuing queries etc.
PZ

Similar Messages

  • Exception when displaying ViewObject result on web page

    Hi experts,
    I have two view object ViewObject1 and ViewObject2. I have created Assoccion ViewObject1 to ViewObject2 with cardinality "1 to 0..1" option and create view link between ViewObject1 to ViewObject2.
    When to drag and drop ViewObject1 to view1.jspx page jdeveloper creates column input text with binding value <af:inputText value="#{row.ViewObject2.bindings.MyColumnName.inputValue}"
    view1.jspx source code show warning message "Reference ViewObject2.bindings.MyColumnName not found" . After run view1.jspx framework generate runtime exception "ViewObject2 return null value" .
    How to fix this error?

    Could you pls explain what you want to do?
    Anyway I will write:
    Associations are created based on EOs not on VOs. If you do not want to update data you can get it done only by crating a View or View Link without creating an Association.

  • Help in retrieveing Blob from Oracle db and display it on a web page

    I am using Sun Studio creator2 and this is what I want to achieve:
    When I click on "Load" button, the image is displayed on the web page(the application is a web application)
    I have dropped the "image" object from the pallette
    Having the database image displayed in the image field, when I enter the image ?Id? and click on the ?Load? button.
    Here is my piece of code:
    public String loadButton_action() {
    HttpServletRequest request = null;
    HttpServletResponse response = null;
    String connectionURL = "jdbc:oracle:thin:@//localhost:1521/cdecentre1";;
    /*declare a resultSet that works as a table resulted by execute a specified
    sql query. */
    ResultSet rs = null;
    // Declare statement.
    PreparedStatement psmnt = null;
    // declare InputStream object to store binary stream of given image.
    InputStream sImage;
    Connection connection = null;
    String driverName = "oracle.jdbc.driver.OracleDriver";
    String dbName = "cdecentre1";
    String userName = "christian";
    String password = "cc";
    String theid = (String)idField.getValue(); //reading the image id
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    connection = DriverManager.getConnection(connectionURL, userName, password);
    /* prepareStatement() is used for create statement object that is
    used for sending sql statements to the specified database. */
    psmnt = connection.prepareStatement("SELECT image FROM CHRISTIAN.PICTURES WHERE id = ?");
    psmnt.setString(1, theid);
    rs = psmnt.executeQuery();
    if(rs.next()) {
    byte[] bytearray = new byte[1048576];
    int size=0;
    sImage = rs.getBinaryStream(1);
    //response.reset();
    response.setContentType("image/jpeg");
    while((size=sImage.read(bytearray))!= -1 ){
    response.getOutputStream().write(bytearray,0,size);
    rs.close();
    psmnt.close();
    connection.close(); } }
    } catch(Exception ex){
    System.out.println("error :"+ex);
    return null; }
    At the moment, when I click on the ?Load? button, the image is not present in the image field.
    I am only obtaining a message inside the message component.
    What should I do to have the image displayed in on the web page?
    Your help will be highly appreciated.

    A comprehensive dissertation from Javaworld: http://www.javaworld.com/javaworld/jw-05-2000/jw-0505-servlets.html
    Published 05/05/2000, ergo Java 1.0/1 era... still a valid explanation of the problem and the fundamental solution, but take the code (esp ImageIO) from here
    http://blog.codebeach.com/2008/02/creating-images-in-java-servlet.html
       1. package com.codebeach.servlet; 
       2.  
       3. import java.io.*; 
       4. import javax.servlet.*; 
       5. import javax.servlet.http.*; 
       6. import java.awt.*; 
       7. import java.awt.image.*; 
       8. import javax.imageio.*; 
       9.  
      10. public class ImageServlet extends HttpServlet 
      11. { 
      12.     public void doGet(HttpServletRequest req, HttpServletResponse res) 
      13.     { 
      14.         //Set the mime type of the image 
      15.         res.setContentType("image/jpeg"); 
      16.  
      17.         try 
      18.         { 
      19.             Create an image 200 x 200 
      20.             BufferedImage bufferedImage = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB); 
      21.  
      22.             //Draw an oval 
      23.             Graphics g = bufferedImage.getGraphics(); 
      24.             g.setColor(Color.blue); 
      25.             g.fillOval(0, 0, 199,199); 
      26.  
      27.             Free graphic resources 
      28.             g.dispose(); 
      29.  
      30.             //Write the image as a jpg 
      31.             ImageIO.write(bufferedImage, "jpg", res.getOutputStream()); 
                        ////////////// NICE !!!! //////////////
      32.         } 
      33.         catch (IOException ioe) 
      34.         { 
      35.            e.printStackTrace();
      36.         } 
      37.     } 
      38. }  Edited by: corlettk on 19/01/2009 23:22 ~~ {color:#FF0000}Never{color} eat an exception!

  • Can display Web pages from servlet but not applet?

    I have been able to display real-world Web pages from a simple servlet using JDeveloper 3.0, but can't figure out how to do the same from an applet. Any hints?

    My previous post had the detail...Probably a simple question from a relative novice. I'm having a problem just viewing web pages by calling them from a "list" of URLs in an applet. I built an applet with a split pane that has a JTree on one side and an "HTML viewing pane" on the other. I can click JTree nodes to display local html files, but I don't understand how to display web pages from the Internet. Do I need something like HyperlinkListener to make the jump to "hyper-world"???

  • Creating an Aperture web page from photos the page goes white and nothing displays. Is this a RAM issue?

    I have just purchased an iMac 27" 2.7GHZ running OSX 10.7.4 with 4GB RAM (16 GB has been ordered). I am using Aperture 3.3.2. When I attempt to create a web page from photos the page goes white and nothing displays. Is this a RAM issue?

    I have resolved the issue....turns out that, in my case, running OSX 10.8.1 with Aperture 3.3.2 was what was required! I was running Aperture 3.3.2 with OSX 10.7.x and had this issue.
    I hope this helps someone else as well.

  • Is it possible to display a safari web page from my phone to lap top

    is it possible to display a safari web page from my phone to lap top?

    No, why not use laptop browser to view the page?

  • Browser cannot display E3200 router web page from ethernet connection but can from wireless

    I have installed my E3200 downstream from the Verizon FiOS Actiontec (going the other way disables FiOS functions).
    1.  My browser can get to the E3200 (192.168.1.2) when connected via wireless, but not when connected via ethernet cable.
         How do I fix that?
    2. When going to connect wirelessly, the 2GHz connection is visible but the 5 GHz connection is not
         (I have them named differently).
         How do I see both wireless connections?

    My browser cannot get to my E3200 setup web page from a wired Ethernet connection (wireless works fine).
    The Linksys E3200 (1Gb ethernet, “n” wireless) is installed downstream from a Verizon FiOS Actiontec router (10/100 ethernet, “g” wireless).
    I cannot put the E3200 upstream from the Verizon router because I would lose FiOS TV capabilities.
    The E3200’s fixed IP address is 192.168.1.2 (the Verizon router is 192.168.1.1)
    I cannot change the subnet (e.g. to 192.168.2.x)
    Clearing the browser cache and rebooting both routers doesn’t help.
    Both computers tested have dual band “n” network adapters.
    So... wireless connection works fine, but I cannot get to the setup page via wired ethernet.
    Help?

  • 866VAE - cant acces web pages from LAN

    Hi everyone,
    im fighting with Cisco 866VAE-K9 for few days. I have got ADSL2+ line in Cisco, i can ping anything from router (like 8.8.8.8 or www.google.com), test of connection in CCP runs successfully, but i cant acces web pages from LAN computers. From LAN i can ping to any IP adress in internet (like 8.8.8.8), but i cant ping or access domain names of web pages (like www.google.com). I know there is probably something wrong in my config, but after 2 days of googling i cant find where the problem is. Can anybody help?
    Here is my running config:
    Building configuration...
    Current configuration : 8181 bytes
    ! Last configuration change at 11:31:15 UTC Fri Mar 6 2015 by admin
    version 15.2
    no service pad
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname cisco_866vae
    boot-start-marker
    boot-end-marker
    logging buffered 51200 warnings
    enable secret 5 xx
    enable password xx
    aaa new-model
    aaa authentication login default local
    aaa authorization exec default local 
    aaa session-id common
    wan mode dsl
    ip port-map user-protocol--1 port tcp 3500
    ip name-server 8.8.8.8
    ip cef
    no ipv6 cef
    parameter-map type protocol-info yahoo-servers
     server name scs.msg.yahoo.com
     server name scsa.msg.yahoo.com
     server name scsb.msg.yahoo.com
     server name scsc.msg.yahoo.com
     server name scsd.msg.yahoo.com
     server name cs16.msg.dcn.yahoo.com
     server name cs19.msg.dcn.yahoo.com
     server name cs42.msg.dcn.yahoo.com
     server name cs53.msg.dcn.yahoo.com
     server name cs54.msg.dcn.yahoo.com
     server name ads1.vip.scd.yahoo.com
     server name radio1.launch.vip.dal.yahoo.com
     server name in1.msg.vip.re2.yahoo.com
     server name data1.my.vip.sc5.yahoo.com
     server name address1.pim.vip.mud.yahoo.com
     server name edit.messenger.yahoo.com
     server name messenger.yahoo.com
     server name http.pager.yahoo.com
     server name privacy.yahoo.com
     server name csa.yahoo.com
     server name csb.yahoo.com
     server name csc.yahoo.com
    parameter-map type protocol-info msn-servers
     server name messenger.hotmail.com
     server name gateway.messenger.hotmail.com
     server name webmessenger.msn.com
    parameter-map type protocol-info aol-servers
     server name login.oscar.aol.com
     server name toc.oscar.aol.com
     server name oam-d09a.blue.aol.com
    crypto pki trustpoint TP-self-signed-2886901321
     enrollment selfsigned
     subject-name cn=IOS-Self-Signed-Certificate-2886901321
     revocation-check none
     rsakeypair TP-self-signed-2886901321
    crypto pki certificate chain TP-self-signed-2886901321
     certificate self-signed 01
    controller VDSL 0
    class-map type inspect match-any SDM_BOOTPC
     match access-group name SDM_BOOTPC
    class-map type inspect match-any ccp-cls-protocol-p2p
     match protocol edonkey signature
     match protocol gnutella signature
     match protocol kazaa2 signature
     match protocol fasttrack signature
     match protocol bittorrent signature
    class-map type inspect match-all ccp-cls--1
     match access-group name all
    class-map type inspect match-all ccp-cls--2
     match access-group name all1
    class-map type inspect match-any ccp-cls-protocol-im
     match protocol ymsgr yahoo-servers
     match protocol msnmsgr msn-servers
     match protocol aol aol-servers
    class-map type inspect match-any SDM_SSH
     match access-group name SDM_SSH
    class-map type inspect match-any SDM_HTTPS
     match access-group name SDM_HTTPS
    class-map type inspect match-all SDM_GRE
     match access-group name SDM_GRE
    class-map type inspect match-any SDM_SHELL
     match access-group name SDM_SHELL
    class-map type inspect match-any sdm-cls-access
     match class-map SDM_HTTPS
     match class-map SDM_SSH
     match class-map SDM_SHELL
    class-map type inspect match-all sdm-access
     match class-map sdm-cls-access
     match access-group 101
    policy-map type inspect ccp-policy-ccp-cls--1
     class type inspect ccp-cls--1
      pass
     class class-default
      drop
    policy-map type inspect ccp-policy-ccp-cls--2
     class type inspect ccp-cls--2
      pass
     class class-default
      drop
    zone security out
    zone security in
    zone-pair security sdm-zp-in-out source in destination out
     service-policy type inspect ccp-policy-ccp-cls--1
    zone-pair security sdm-zp-out-in source out destination in
     service-policy type inspect ccp-policy-ccp-cls--2
    interface Loopback0
     ip address 192.168.100.1 255.255.255.0
     zone-member security in
    interface ATM0
     no ip address
     no atm ilmi-keepalive
    interface ATM0.1 point-to-point
     pvc 8/48 
      oam-pvc manage
      pppoe-client dial-pool-number 1
    interface Ethernet0
     description $ETH-WAN$
     no ip address
     shutdown
     pppoe-client dial-pool-number 2
    interface FastEthernet0
     no ip address
    interface FastEthernet1
     no ip address
    interface FastEthernet2
     no ip address
    interface FastEthernet3
     no ip address
    interface GigabitEthernet0
     no ip address
    interface GigabitEthernet1
     description $ETH-WAN$$FW_OUTSIDE$
     ip address dhcp client-id GigabitEthernet1
     ip tcp adjust-mss 1412
     shutdown
     duplex auto
     speed auto
    interface Vlan1
     description $FW_INSIDE$
     ip address 192.168.7.1 255.255.255.0
     ip nat inside
     ip virtual-reassembly in
     zone-member security in
     ip tcp adjust-mss 1412
    interface Dialer1
     no ip address
    interface Dialer2
     description $FW_OUTSIDE$
     ip address negotiated
     ip mtu 1452
     ip nat outside
     ip virtual-reassembly in
     zone-member security out
     encapsulation ppp
     dialer pool 1
     dialer-group 3
     ppp authentication chap pap callin
     ppp chap hostname o2
     ppp chap password 0 o2
     ppp pap sent-username o2 password 0 o2
    ip forward-protocol nd
    ip http server
    ip http authentication local
    ip http secure-server
    ip nat source list 101 interface Dialer2 overload
    ip nat inside source static tcp 192.168.7.39 3500 interface Dialer2 3500
    ip nat inside source list 101 interface Dialer2 overload
    ip nat inside source route-map MAP_ACL interface Dialer2 overload
    ip route 0.0.0.0 0.0.0.0 Dialer2 permanent
    ip route 192.168.2.0 255.255.255.0 192.168.7.3 permanent
    ip access-list extended NAT_ACL
     deny   ip 192.168.0.0 0.0.0.255 192.168.0.0 0.0.255.255
     permit ip 192.168.0.0 0.0.0.255 any
    ip access-list extended SDM_BOOTPC
     remark CCP_ACL Category=0
     permit udp any any eq bootpc
    ip access-list extended SDM_GRE
     remark CCP_ACL Category=1
     permit gre any any
    ip access-list extended SDM_HTTPS
     remark CCP_ACL Category=1
     permit tcp any any eq 443
    ip access-list extended SDM_SHELL
     remark CCP_ACL Category=1
     permit tcp any any eq cmd
    ip access-list extended SDM_SSH
     remark CCP_ACL Category=1
     permit tcp any any eq 22
    ip access-list extended all
     remark CCP_ACL Category=128
     permit ip any any
    ip access-list extended all1
     remark CCP_ACL Category=128
     permit ip any any
    access-list 2 remark CCP_ACL Category=2
    access-list 2 permit 192.168.7.0 0.0.0.255
    access-list 101 remark CCP_ACL Category=128
    access-list 101 permit ip any any
    access-list 101 permit udp any any eq domain
    access-list 101 permit udp any eq domain any
    dialer-list 1 protocol ip permit
    dialer-list 2 protocol ip permit
    dialer-list 3 protocol ip permit
    mac-address-table aging-time 15
    route-map MAP_ACL permit 10
    line con 0
     no modem enable
    line aux 0
    line vty 0 4
     exec-timeout 40 0
     password xxxxxxx
     transport input telnet ssh
     transport output telnet ssh
    scheduler allocate 60000 1000
    end

    Hi,
    I would be happy to help but I have one question first: Your configuration contains a lot of cruft generated from SDM/CCP and I am not sure if any of that is really required by you. Do you believe you would be fine with having this entire configuration trimmed down and do just what's supposed to do (routing and NAT), and we had security measures added in later? Just by the way, I do not believe you need the zone-based firewall. In your simple setup with just a few inside/outside interfaces, it does not add any real value apart from making the configuration virtually unreadable. We can easily do the same with IP Inspect.
    Best regards,
    Peter

  • Web pages from scratch

    Is there a way to build web pages from scratch and upload them via LOADPSP.EXE, similarly to the way you can do it witht the web toolkit?
    For example:
    <html>
    <body>
    <% some plsql code here %>
    show output here: <%=variable%>
    </body>
    </html>
    Thanks,
    Christoph

    Thanks for the reply.
    I found a little workaround that gives me what i need:
    1. I create the psp page in Dreamweaver
    2. Load it in to my test database with loadpsp.
    3. Copy the procedure body from the test database into a PL/SQL Dynamic Content region.
    The only changes i have to make are changing the procedure parameters to use htmldb bind variables.
    Christoph

  • Removing web pages from "Favorites"

    I'm trying to remove old web pages from the "favotites" in the top bar area. I tried highlighting then deleting but not working. Any advice would be greatly appreciate it.

    Thanks for the reply.
    I found a little workaround that gives me what i need:
    1. I create the psp page in Dreamweaver
    2. Load it in to my test database with loadpsp.
    3. Copy the procedure body from the test database into a PL/SQL Dynamic Content region.
    The only changes i have to make are changing the procedure parameters to use htmldb bind variables.
    Christoph

  • Open a web page from Oracle

    plz, i use oracle 10g but how can i open/ping a web URL from pl/sql code?

    Thank you venky but you should post the link as link and not between tags !
    [Re: Opening a web page from oracle
    SS                                                                                                                                                                                                                                                                                                                                               

  • Can I print web pages from firefox using adobe pro 9 (Not using PDF download) and if so how

    Can I print web pages from Firefox 3.6.12 using adobe pro 9 (not using PDF Download) and if so how.

    {Ctrl + P} - do you have a PDF Printer listed in the Printer - Name drop-down?

  • TS3276 i am unable to open web pages from email links on my ipad

    I am unable to open web pages from email links on my ipad

    A few more details might help, if nobody else recognizes this.   
    What happens when you try to open the links?
    Can you post an example of a link that doesn't work?
    Is there any particular source for the mail with the (bad) links, or is mail from all sources failing?
    If you happen to know it, what's the format of the mail message?  (Maybe the message is an image?)
    Do the embedded links work as expected from an OS X system running Mail.app, or some system and some other other mail client?
    To view the link in iOS: if you press on and hold your finger on an embedded link in most contexts, iOS will show a pop-up with the link contents, and will offer to copy it.  You can use that to acquire and post the link.  If pressing and holding on the link doesn't offer the pop-up, the format of the link itself may not be valid, or it might not really be a link.

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • Why can't I print a web page from my Android 4.1 phone to my 8500a printer? e-print is working.

    Why can't I print a web page from my Samsung Android 4.1 to my Officejet Pro 8500A. eprint is working, so I can send e-mails to my e-print address, but when I try to print a web page, it says that I don't have a printer. Can someone help me with this? 
    This question was solved.
    View Solution.

    Just received an update to the Android version of HP ePrint.
    It now has the ability to print web pages!  Thanks HP!  
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

Maybe you are looking for

  • SSO between Portal and Nakia.....problem with SSO... library not found..

    Hi Sdn's  and Nakisa tehnical experts, We have a Portal environment 7.02 , a Nakisa environment 3.0  (CE) and and HR backend environment 701 (604). We are busy setting up SSO between Portal and Nakisa via the, URL iview for the Org chart (http://<hos

  • Stock transfer between plants in a company with different price

    Hi, expert, i want to transfer materials between plants inside a company with different price which set by supply plant randomly, not the valuation price, how can i achieve this? Thxs & best wishes, David

  • Assigning a responsiblity to mutiple users

    Hi we are using oracle11i(11.5.10.2) on windows 2000 server i need to assign a responsibility to 500 users, is any shortest way to assign this resonsibility to 500 users? and i need to remove a resonsibility from 500 users ,is any shortest way to rem

  • How do I review the purchases I've made via app store?

    More specifically, I'm interested in the in-app purchses and in-app upgrades purchased. I'm aware that emails will be sent to me but these are often untimely and lacking in details. This is not helped at all by the overly convoluted way that Apple us

  • OLAP DML IF CONDITION

    Hi All, I am receiving an error when I try to use if condition in a program. variable v_Count decimal variable v_Mean decimal variable v_Id text LIMIT K_QUESTIONS TO K_QUESTIONS_LEVELREL 'QUESTION_ID' LIMIT K_SCALES TO '3' LIMIT K_TRACKS TO '2' LIMIT