AJAX and PL/SQL

Hi guys,.

I have a PL/SQL procedure that calls a php script (which returns an XML document) using AJAX. I want to change it to call another procedure PL/SQL instead of the PHP script. I created a PL/SQL procedure that mimics the output of the PHP script exactly, but AJAX no longer works. Here is my code:

PL/SQL - calling procedure
PROCEDURE myWebpage is
begin
  
  -- Web page header

  htp.print('
      function getSubcategories(){

             var ajaxRequest;

              try{
                      // Opera 8.0+, Firefox, Safari
                      ajaxRequest = new XMLHttpRequest();
              } catch (e){
                      // Internet Explorer Browsers
                      try{
                              ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
                      } catch (e) {
                              try{
                                      ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
                              } catch (e){
                                      // Something went wrong
                                      alert("Your browser broke!");
                                      return false;
                              }
                      }
              }

        ajaxRequest.onreadystatechange = function(){
              if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200){
                var xmlDocument = ajaxRequest.responseXML;
                var options = xmlDocument.getElementsByTagName("option");

                var subcatSelect = document.getElementById("subcat_sel");
                subcatSelect.options.length = 0;

                for(var i=0; i<options.length; i++)
                        subcatSelect.options[i] = new Option(options.firstChild.data);

if ( document.requestInfo.pCategory.value == "Academic" ) {
document.getElementById(''acad_div'').style.display = "inline";
}

else {
document.getElementById(''acad_div'').style.display = "none";
document.requestInfo.pContactMethod.value = "Email";
}
}
}

// THIS LINE IS THE PHP CALL
ajaxRequest.open("POST", "http://mysite.com/dsu/query/ajaxquery.php", true);

// THIS LINE WILL BE USED FOR PL/SQL CALL
// ajaxRequest.open("POST", "http://mysite.com/SSBDADTST7/pkgAjax.ajaxQuery", true);

ajaxRequest.setRequestHeader(''Content-Type'', ''application/x-www-form-urlencoded'');
ajaxRequest.send("p_category=" + document.requestInfo.pCategory.value);

}

');

-- REST OF WEBPAGE

end myWebpage;
PHP SCRIPT
<? PHP
Query Script Ajaxquery.php

include("..) /.. /.. ("/ ajax/connect.php");

$category = $_POST ['p_category'];

Query

If ($category == 'University') {}
$query = ociparse ($conn, ' select subject_desc from all_subjects)
order of subject_desc');
}

else {}

$query = ociparse ($conn, ' select subcategory_desc in the categories)
where category =------". $category. '\'
and active = \'A\'
order of subcategory_desc');
}

ociexecute ($Query);

Output

Header ("Content-type: text/xml");
echo "<? XML version=\"1.0\"? " > ';

echo "< options >";
While (ocifetchinto ($query, $row, OCI_ASSOC)) {}

$keys = (array_keys ($row));

{foreach ($keys as $k)
echo '< option > '. $row [$k]. "< / option >";
}

}

echo "< / options >;

? >
PL/SQL - Called Procedure
PROCEDURE ajaxQuery (p_category in varchar2) is

type ref_cursor is ref cursor;

subcat_curs ref_cursor;
lSubcat categories.subcategory_desc%type;

Start

If (p_category = 'Academic') then
Open the subcat_curs for
Select subject_desc from all_subjects
order of subject_desc;
on the other
Open the subcat_curs for
Select subcategory_desc in the categories
where category = p_category
and active = 'A '.
order of subcategory_desc;
end if;

HTP. Print (' <? xml version = "1.0"? > ');
HTP. Print ('< options >');

loop
extraction of subcat_curs in lSubcat;
When the output subcat_curs % notfound;
HTP. Print ('< option >' | lSubcat |) ("< / option > ');
end loop;

HTP. Print ('< /options >');

close subcat_curs;

end getSubcategories;
Now I have tested the output of the PHP script and the second PL/SQL procedure and they are identical.  I uncommented the line in the first PL/SQL procedure under "THIS LINE WILL BE USED FOR PL/SQL CALL".  But the line where

var xmlDocument = ajaxRequest.reponseXML;

is returning a null object when I use the PL/SQL call.  Do I need to modify something else for this to work?

Here's my oracle version, just in case:
Oracle Version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
NLSRTL Version 10.2.0.4.0 - Production

Thanks

Edited by: jschmidt10 on May 17, 2010 7:32 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

jschmidt10 wrote:

Now, I have tested the output of the PHP script and the second PL/SQL procedure and they are identical. I uncommented the line in the first PL/SQL procedure under "THIS LINE WILL BE USED in PL/SQL, CALL". But the line where

xmlDocument var = ajaxRequest.reponseXML;

Returns a null object when I use PL/SQL call. I have to change something to make it work?

Note that PL/SQL is used to create a dynamic Mime stream - in your case, a stream of text/html . It is then read by mod_plsql (web server module) and passed (via web server) to the client.

The Ajax code is executed by the client web browser.

If this Ajax code behaves as expected, then the stream of text/html you generated is not correct and does not match the content of the task force generated using PHP.

So it is not a PL/SQL or Oracle specifically. He's a programmer pure question - not an Office of the coding language.

I don't like your approach by the way. There are inherent problems, mixing the source code of 2 different languages in the same unit of code, where the compiler/Analyzer offers no integration between the two. This forces you to deal with the only language, JavaScript in your case, as text strings.

Automatically, this is a question regarding the use of quotation marks, special characters, formatting and so on. He changed this code complex and difficult. Debugging more often impossible.

The right approach is one of the following conditions.

If the Ajax code is static, create a dedicated JavaScript file that contains the code. Inside PL/SQL, question one JavaScript include statement to load this JavaScript in the browser.

If the Ajax code is dynamic (should not be - you need to generate JSON from PL/SQL instead), and then store the model code Ajax as a CLOB in a table. Use special chips to mark the dynamic parts (for example where a token like + #NAME #+ indicates the text to be replaced). At runtime in PL/SQL, use the replace() function to create a CLOB from the model, with the text of replacement if necessary. Then write this CLOB variable content in the browser via the package htp .

The fundamental issue here is of modularization. Modularize your designs. Modularize your code. It's the cornerstone of software engineering. The difference between a hack and quality in all aspects - scalability and performance for maintenance for debugging.

Tags: Database

Similar Questions

  • Update for Windows XP (KB2718704) and Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) will be without installation

    ORIGINAL TITLE: updates XP

    Update for Windows XP (KB2718704) and Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) will BE WITHOUT INSTALLATION

    Please answer each of the following [admittedly tedious] diagnostic questions in a numbered list type in your very next answer (no need to quote this post):

    1. What is the full name of your application or the installed antivirus security suite and when (date about) is your subscription current expires?  What (other than Defender) anti-spyware applications are installed?  What third-party firewall (if applicable)?

    2 a Norton or McAfee application ALREADY installed on the computer?

    3. do you have a free trial Norton or a test of free McAfee [CHOOSE ONE ANSWER] come preinstalled on the computer when you bought it? (No matter if you have never used or activated).

    4. open Add/Remove Programs and make sure that Show updates at the top is checked (and leave it checked); then select the name in the box sort by on the right. Now do scroll down & tell me if ALL the other updates following up-to-date are listed?

    (a) KB2676562,262, KB2686509 & KB2695962KB2659;

    (b) KB2675157, KB2653956 & KB2621440;

    (c) KB2661637, KB2598479, KB2631813 & KB2585542;

    (d) KB2633171, KB2393802 and especially KB971029

    Most will appear as Windows XP security update , followed by the number in brackets.

    If IE8 is installed, two 2 will appear as a security for Windows Internet Explorer 8 update , followed by the number in brackets.

    5. is Firefox, Chrome or any other alternative browser installed?

    6. what version of Java is installed?  TEST HERE in USING IE (only!)-online http://java.com/en/download/installed.jsp

    7. are you familiar with "Registry cleaners" (e.g., Registry Mechanic;) System Mechanic; RegCure; RegClean Pro. Advanced SystemCare. Registry Booster; McAfee QuickClean. AVG PC TuneUp. Norton Registry Cleaner; PCTools optimizer; SpeedUpMyPC; Advanced System Optimizer. TuneUp Utilities; WinMaximizer; WinSweeper; CCleaner)?

    8 have you ever had the opportunity to do a repair install or clean install of Windows XP for some reason any?

    Note: KB2463332 is a update optional, not security. Feel free to hide it.

  • Recent activity of SQL and PL/SQL space

    SQL and PL/SQL used to have sections of recent content and recent activity. However, given that the last mess has been set, the recent activity section is gone.

    Is it possible it could be brought back, please?

    No problem. I added it to the bottom.

  • Catproc.SQL and Catalog.sql run by mistake in the production database while the database is running.

    Hello

    DB version: 10.2.0.4.0 cluster db. EA

    Version of the OS: Win server 2008

    by mistake one of our dba ran CATPROC.sql and CATALOG.sql scripts in our live production rac database.

    After that issues rose and developers face invalid objects. We erased our users manually main invalid objects and it looks like everything is working well for the moment.

    BUT when I checked object invalid status, he showed me some 600 disabled objects. I'm afraid in the future will come from unacceptable errors.

    What should do? any suggestions? are we in danger? What are workarounds.

    Thank you

    You must connect a SR with Oracle's Support.

    Hemant K Collette

  • vCO and MS SQL Express not connect

    Hi, I installed vCO and MS SQL Express locally. But I can not not to connect to SQL from the server configuration CO v.

    On the database tab, I use these settings:

    Type of database: SQL Server

    Username: VM-ORCHESTRATOR\Administrator - as the BOD of DB - Oct

    Password: xxxxxxx

    Use SSL: NO

    DNS or ip address of the Server DB

    Name: localhost

    Port: 1433

    Name of the database: DB - vCO

    Instance name: SQLExpress

    Area: white

    Use Windows auth. mode: YES

    Journal:

    Unable to connect to jdbc:jtds:sqlserver://localhost:1433 / DB - vCO; instance = SQLExpress; useNTLMv2 = true.  Failed to connect to the user 'VM-ORCHESTRATOR\Administrator.

    SQL server is running, SQL browser, I can to connect to SQL server as a local VM-ORCHESTRATOR\Administrator, I created the database DB - vCO, dbo = VM-ORCHESTRATOR\Administrator.

    Host VM ORCHESTRATOR is a member of the field of MS, but I installed vCO as the local administrator.

    Can you help me please?

    Milan

    You can get this working... to change your user name 'administrator' and instead of letting the empty field, enter "VM ORCHESTRATOR" (I guess it's the name of your workstation) - when you use is not a field, this field must be the name of your workstation as well, whenever I install on vCO on a Windows Server , I never checked the use of NTLM authentication box... so if my first note does not help, also clear this check box.

  • In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date?

    Hello world

    During playback of Oracle ADF Real World Developer's Guide, I noticed the dates match occurring in JDeveloper is different from what is the list in the book. JDeveloper is failing to oracle.jbo.domain.Date, but according to the book:

    DATEjava.sql.DateDATE type is mapped to java.sql.Date if the column in the table is a no time didn't need information zone.
    DATEjava.sql.TimestampDATE type is mapped to java.sql.Timestamp if the column in the table has a component "time" and that the client needs to zone information.
    TIMESTAMPjava.sql.TimestampThe TIMESTAMP type is mapped to java.sql.Timestamp if nanosecond precision is used in the database.

    In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date? Using java.sql.Date and java.sql.Timestamp could save me some headaches conversion date. And, is there a place in JDeveloper to display these maps? I looked around and didn't see anything.

    Thank you.

    James

    User, what version of jdev we are talking about?

    In GR 11, 1 material versions db types date and timestamp are mapped to types of domain data that represents a wrapper for the native data types. The reason was that the framework can work with the domain types regardless of the underlying data type.

    Since Oracle 11 GR 2 maps the types DB to java types (default selection, you can change it when you create a model project, you can set the Data Type Mapping). Once the pilot has business components define you cannot change this setting it would break existing components such as eo or vo.

    So if you are working wit 11 GR 1 subject, you must use the domain types, if you work with GR 11, 2 or 12 c, you can use the domain types, but it is recommended to use the java type mapping.

    Timo

  • The elements and the SQL Types

    I just started learning apex and I'm confused about the application and page elements. Since they can serve as a kind of variables in the SQL and PL/SQL (for example, by using the syntax variables bind), at some point they should be prescribed a type, since SQL and PL/SQL are two strongly typed languages.

    It seems that the items have types, see the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e11947/bldapp.htm#BCEDCGGH), but I don't know how they correspond to the SQL types.

    For example, I saw that to_date is always used with items of type date picker, implying that it is a string of SQL type.

    So the question. What have SQL type apex page/application parts, is what type conversion do I need to use when dealing with items in SQL and PL/SQL?

    They are all VARCHAR2 (4000) as far as I know - anything application are the same and the page elements is adjustable in number or date more. Put date or number will include only internal validation, check whether the format is match the parameters of globalization of applications.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Files catproc. SQL and catalog.sql

    I am using oracle 10g recently that I managed two files catproc.sql and catalog files by connecting to sys

    After running these files in sys when I select


    Select * from tab;

    no lines have been returned
    (1) these files will show any eeect on database
    (2) to Toad when I connect to the Toad for data base is to show all the user sys tables
    will there be an effect of the execution of these files

    After running these scripts, you will need to create spfile from pfile and the startup pfile from this file file

    is incorrect. Catproc.sql and Catalog.SQL don't change the values of instance parameter. The instance parameter files are useless to be recreated.

    Hemant K Collette

  • Java - functions and PL/SQL procedures?

    It is my understanding that Java can call stored PL/SQL and PL/SQL procedures and functions can call Java stored procedures and functions.

    The reason why I ask this is that my company is considering options on how to migrate our product. Our consultant said that PL/SQL cannot access Java procedures. I think they can. I am not well educated in the present, but I'm trying to learn as much as I can before we committed.

    Our graphical interface is written in Java, but they are still debating the back-end (lots of great transaction). Some think that it should be written in Java, some Java State itself would be too slow. I read the mantra of AskTom - SQL, PL/SQL, Java, and C.

    So, what's the scoop?

    What is the preference, or best practices?

    >
    It's the answer that confused me: PL/SQL cannot access Java procedures in an external JAVA virtual machine, but Oracle has its own JAVA virtual machine integrated in the database (except express edition).
    >
    Since I wrote it I'll try to explain it.

    Oracle, with the exception of the express edition, has a functionality integrated into the database (including the JVM) Java. You can import the java classes and jar files in the Oracle database and run Java code using the JAVA virtual machine, which is part of the Oracle.

    By "External JVM", I hear one application that is launched from the OS and Java Virtual Machine and it is a stand-alone process; in other words, not a part of the Oracle or Oracle of FMV at all.

    Both JVMs running in the 'sandbox' different and do not have access to each other code, classes, or process. Of course, they may be able to communicate using sockets, JNDI, EJBs and other features of wrapper, but they cannot access each other classes, instances of class or methods as they would if only there wasn't one JAVA virtual machine.

    So a stand-alone Java application can call stored procedures in Oracle (even those written in Java), Oracle PL/SQL procedures can call Java from Oracle procedures, Oracle Java procedures can call Oracle PL/SQL procedures. But procedures Oracle PL/SQL or Java can't call procedures or access to Classes or class instances that are part of an external JAVA virtual machine.

  • Resources for learning SQL and PL/SQL?

    Dear Sirs and Madams,

    I am (as I explained in the post initially) student fact different database project. I want to learn Oracle SQL and PL/SQL. What are good resources for learning - I think that books and example scripts/SQL. Thanking, Rajiv.

    >

    I am (as I explained in the post initially) student fact different database project. I wish
    Learn the Oracle SQL and PL/SQL. What are good resources for learning - I
    think that the books and example scripts/SQL. Thanking, Rajiv.

    Well, let's first - become familiar with SQL * Plus - Oracle standard tool. Maybe it's a little 1980
    but it will be available on absolutely every system you use. As long as a student, I don't think you
    have a lot of money to spend on tools - so download Oracle's SQL developer tool (free)
    and experiment with it.

    On your own systems, there are already scripts - do (presumably in Unix - if Windows, use the search)
    Tool) - $ORACLE_HOME do you find. -name "*.sql" and watch the rdbms/admin scripts. In addition,
    There are a few free libraries available.
    http://www.Oracle-base.com/DBA/scripts.php
    www.rampant.cc/Internals.zip
    http://www.Oracle-Developer.NET/utilities.php (look at the MOAT).

    Then, after that, you could look at the site of Tanel Poder and Christian Antognini (both peak) also
    Google "Oracle SQL/PL/SQL script libraries.

    There are enough out there on the internet to keep you going for years :)

    For PL/SQL, the best authors are Connor McDonald and Steve Feuerstein, if you want to invest in
    a book.

    HTH,

    Paul...

  • Strange thing in the SQL and PL/SQL

    Hi all

    I meet a very strange thing of the length of the string in SQL and PL/SQL.
    I ran the length of the string SQL and PL/SQL. The output values do not match.
    Can you please help me on how this happens?

    SQL
    select LENGTH ( '!w0n5hn:  0.1 qlpgz-P0h1txtn-tk68-..1tk81-!A_kh0nlw_P0hphn0ln kh0nlw P0hphn0ln
    zyntwm qlpgz – P0h1txtn 0n1 B00n1n – T00xk-..2 pwqt50wmwntn zt0ttn Pwn15nl pwlw0nw
    tk pwfw0wnxw1 Extwnn5hn hf: T00xk ..1 qlpgz-P0h1txtn-tk77-!A_P0hphn0ln_B0hwnw0
    Annhx50tw1 tkpn 
    P05m00y Axth0n 
    zwxhn100y Axth0n 
    gwnx05pt5hn  zx0wwn 1
     
     
     
     
    
    zx0wwn 2
     
     
     
     
     
     
     
     
    
    zx0wwn .
     
     
     
     
     
     
     
     
    
    zx0wwn !
     
     
     
     
     
     
     
     
    
    zx0wwn 5
     
    
    P0w-khn15t5hnn ed Thw tnw0 m0y l0tnxh thw kh0nlw P0hphn0l f0x5l5t5wn hy nwlwxt5nl thw kh0nlw !0ltw ftnxt5hn hn thw p0hphn0ln h0hwnw0
    Phnt khn15t5hnn ed Fhllhw5nl thw ntxxwnnftl kh0nlw hf 0 15xt5hn00y xh0nnwl p0hphn0l, thw nyntwm x0005wn htt fhllhw5nl 0xt5hnn:
    eded Thw xh0nlw1 !0ltw 5n nh lhnlw0 0!05l0hlw fh0 nwlwxt5hn 1t05nl 5twm m05ntwn0nxw; thw nyntwm thw0why p0w!wntn thw !0ltw hw5nl 0nn5lnw1 th 0115t5hn0l 5twmn
    edmq Thw xh0nlw1 !0ltw 5n 0wmh!w1 f0hm 0ll 5twmn hn wh5xh 5t 5n p0wnwnt 0n1 0wpl0xw1 hy thw tnw0 npwx5f5w1 0wpl0xwmwnt; whw0w th5n 5mp0xtn 1w05!w1, 5twm-lw!wl fl0ln, ntxh 0n “pwn15nl 0tthh05n0t5hn”, thw nyntwm 0lnh 0mwn1n thwnw fl0ln 
    ed.. Thw xh0nlw1 !0ltw p0hphn0l 5n 011w1 th thw pwjwxtw1 P0hphn0ln l5h000y, 0lhnl w5th thw xh0nlw x0twlh0y 0n1 0w0nhn th0t 00w npwx5f5w1 hy thw tnw0 5n thw xh0nlw !0ltw 150lhl
    ed!. An 0 0wntlt hf 0wmh!5nl thw xh0nlw1 !0ltw f0hm 0ll 5twmn, 0ll tn0lwn hf thw xh0nlw1 !0ltw 00w, hf xht0nw, 0wmh!wed  Th5n 5nw!5t0hly 0wntltn 5n thw 0wmh!0l hf 0ll p0hphn0ln 5n!hl!5nl thw xh0nlw1 !0ltw 5n 0ll hthw0 xh0nnwln.  Thw 0115t5hn hf 0 nww !0ltw th thwnw 5twmn m0y, hf xht0nw, x0w0tw 0 nww p0hphn0l.  Thwnw p0hphn0ln 00w nht 0tthm0t5x0lly 0tthh05nw1 0n 0 0wntlt hf thw xh0nlw !0ltw 0xt5hn; thwy mtnt hw 01m5n5ntw0w1 hy thw 0pp0hp050tw 0tthh05nw0 5n 0 nwp000tw 0xt5hn
    ed5. An w-m05l nht5f5x0t5hn 5n 1wl5!w0w1 th thw tnw0 whh x0w0tw1 thw p0hphn0l 0n1 th 0ny 0tthh05nw0n whh h0!w 0l0w01y 0tthh05nw1 thw p0hphn0l 5n thw wh0kflhw
    mq Fhllhw5nl thw ntxxwnnftl kh0nlw hf 0 mh1tlw, lhx0l Pk h0 !0ltw-p050 xh0nnwl p0hphn0l, thw nyntwm x0005wn htt fhllhw5nl 0xt5hnn:
    mqed Thw xh0nlw1 !0ltw 5tnwlf 5n 0wt05nw1 5n thw 15xt5hn00y
    mqmq Thw !0ltw 5n 0wmh!w1 f0hm 0ll 5twmn hn wh5xh thw p0hphn0l (NB. thw p0hphn0l, nht thw !0ltw) 5n p0wnwnt 0n1 0wpl0xw1 hy thw tnw0 npwx5f5w1 0wpl0xwmwnt; whw0w th5n 5mp0xtn 1w05!w1, 5twm-lw!wl fl0ln, ntxh 0n “pwn15nl 0tthh05n0t5hn”, thw nyntwm 0lnh 0mwn1n thwnw fl0ln.  In thw x0nw hf !0ltw-p050 p0hphn0ln, hnly thw p0hphn0l !0ltw th0t w0n nwlwxtw1 5n thw p0hphn0ln h0hwnw0 m0y hw xh0nlw1 (5f thw tnw0 w5nhwn th xh0nlw thw hthw0 !0ltw 5n thw p050, thwy mtnt 0xxwnn thw n0mw p050 p0hphn0l !50 th0t !0ltw 5n thw p0hphn0ln h0hwnw0)
    mq.. Thw tn0lw p0hphn0l 5n 011w1 th thw pwjwxtw1 P0hphn0ln l5h000y, 0lhnl w5th thw 0wjwxt5hn x0twlh0y 0n1 0w0nhn th0t 00w npwx5f5w1 hy thw tnw0 5n thw 0wjwxt5hn 150lhl.  Thw 0wpl0xwmwnt !0ltw th0t w0n 0ppl5w1 5n thw xh0nlw 5n 0lnh 0wxh01w1 pw0m0nwntly, nh th0t th5n x0n hw 15npl0yw1 th tnw0n whw0w 0pp0hp050tw 1t05nl 5twm xh15nl 0xt5!5ty
    mq!. An 0 0wntlt hf 0wmh!5nl thw xh0nlw1 !0ltw f0hm nhmw 5twmn, hthw0 tn0lwn hf thw !0ltw m0y 0lnh hw 0wmh!wed  If th5n 5n thw x0nw, 0n1 5f thwnw tn0lwn 00w 0lnh p0hphn0ln, th5n 0lnh 0wntltn 5n thw 0wmh!0l hf p0hphn0ln 5n!hl!5nl thw !0ltw 5n hthw0 tn0lw xh0nnwln (5t 5n w!wn 0 0wmhtw phnn5h5l5ty th0t xh0nl5nl 0 lhx0l Pk p0hphn0l m0y 0wmh!w 0 tn0lw 0n1 p0hphn0l fh0 thw n0mw !0ltw 5n 0nhthw0 lhx0l Pk; n5m5l00ly xh0nl5nl 0 !0ltw p050 m0y 0wmh!w hthw0 !0ltw-p050 tn0lwn/p0hphn0ln).  z5m5l00ly, thw 0115t5hn hf 0 nww !0ltw th 5twmn 0n 0 0wntlt hf thw xh0nlw 0xt5hn, m0y lwnw00tw nww p0hphn0ln 5n 0ny tn0lw xh0nnwl
    mq5. An w-m05l nht5f5x0t5hn 5n 1wl5!w0w1 th thw tnw0 whh x0w0tw1 thw p0hphn0l 0n1 th 0ny 0tthh05nw0n whh h0!w 0l0w01y 0tthh05nw1 thw p0hphn0l 5n thw wh0kflhw
    .. zww 5mplwmwnt0t5hn nhtwn hwlhw, tn1w0 “pwl0tw1 Infh0m0t5hn” 
    B0n5x Flhw 
     fl1l1fl1fl;lj0n1khfh0njkfhzgJKkf xhy0w0ttj 0nwhtj5y0w0hlwfklj0w0lklt5h5hn1fhlj1fhljn1fhlj1fhljwj50w0ytlt5w0j0w5t5
    ztfl!n1fllw0t!qww0wh00wwjh0f0n1jfhn1jkkwjhqw5t! tjt5w0yttwn1fln1ln1fn1') from dual;
    Here, I got an error like
    ORA-01704: string literal too long
    01704. 00000 -  "string literal too long"
    *Cause:    The string literal is longer than 4000 characters.
    *Action:   Use a string literal of at most 4000 characters.
               Longer values may only be entered using bind variables.
    Error at Line: 1 Column: 16
    But in PL/SQL,.
    BEGIN
         dbms_output.put_line(LENGTH ( '!w0n5hn:  0.1 qlpgz-P0h1txtn-tk68-..1tk81-!A_kh0nlw_P0hphn0ln kh0nlw P0hphn0ln
    zyntwm qlpgz – P0h1txtn 0n1 B00n1n – T00xk-..2 pwqt50wmwntn zt0ttn Pwn15nl pwlw0nw
    tk pwfw0wnxw1 Extwnn5hn hf: T00xk ..1 qlpgz-P0h1txtn-tk77-!A_P0hphn0ln_B0hwnw0
    Annhx50tw1 tkpn 
    P05m00y Axth0n 
    zwxhn100y Axth0n 
    gwnx05pt5hn  zx0wwn 1
     
     
     
     
    
    zx0wwn 2
     
     
     
     
     
     
     
     
    
    zx0wwn .
     
     
     
     
     
     
     
     
    
    zx0wwn !
     
     
     
     
     
     
     
     
    
    zx0wwn 5
     
    
    P0w-khn15t5hnn ed Thw tnw0 m0y l0tnxh thw kh0nlw P0hphn0l f0x5l5t5wn hy nwlwxt5nl thw kh0nlw !0ltw ftnxt5hn hn thw p0hphn0ln h0hwnw0
    Phnt khn15t5hnn ed Fhllhw5nl thw ntxxwnnftl kh0nlw hf 0 15xt5hn00y xh0nnwl p0hphn0l, thw nyntwm x0005wn htt fhllhw5nl 0xt5hnn:
    eded Thw xh0nlw1 !0ltw 5n nh lhnlw0 0!05l0hlw fh0 nwlwxt5hn 1t05nl 5twm m05ntwn0nxw; thw nyntwm thw0why p0w!wntn thw !0ltw hw5nl 0nn5lnw1 th 0115t5hn0l 5twmn
    edmq Thw xh0nlw1 !0ltw 5n 0wmh!w1 f0hm 0ll 5twmn hn wh5xh 5t 5n p0wnwnt 0n1 0wpl0xw1 hy thw tnw0 npwx5f5w1 0wpl0xwmwnt; whw0w th5n 5mp0xtn 1w05!w1, 5twm-lw!wl fl0ln, ntxh 0n “pwn15nl 0tthh05n0t5hn”, thw nyntwm 0lnh 0mwn1n thwnw fl0ln 
    ed.. Thw xh0nlw1 !0ltw p0hphn0l 5n 011w1 th thw pwjwxtw1 P0hphn0ln l5h000y, 0lhnl w5th thw xh0nlw x0twlh0y 0n1 0w0nhn th0t 00w npwx5f5w1 hy thw tnw0 5n thw xh0nlw !0ltw 150lhl
    ed!. An 0 0wntlt hf 0wmh!5nl thw xh0nlw1 !0ltw f0hm 0ll 5twmn, 0ll tn0lwn hf thw xh0nlw1 !0ltw 00w, hf xht0nw, 0wmh!wed  Th5n 5nw!5t0hly 0wntltn 5n thw 0wmh!0l hf 0ll p0hphn0ln 5n!hl!5nl thw xh0nlw1 !0ltw 5n 0ll hthw0 xh0nnwln.  Thw 0115t5hn hf 0 nww !0ltw th thwnw 5twmn m0y, hf xht0nw, x0w0tw 0 nww p0hphn0l.  Thwnw p0hphn0ln 00w nht 0tthm0t5x0lly 0tthh05nw1 0n 0 0wntlt hf thw xh0nlw !0ltw 0xt5hn; thwy mtnt hw 01m5n5ntw0w1 hy thw 0pp0hp050tw 0tthh05nw0 5n 0 nwp000tw 0xt5hn
    ed5. An w-m05l nht5f5x0t5hn 5n 1wl5!w0w1 th thw tnw0 whh x0w0tw1 thw p0hphn0l 0n1 th 0ny 0tthh05nw0n whh h0!w 0l0w01y 0tthh05nw1 thw p0hphn0l 5n thw wh0kflhw
    mq Fhllhw5nl thw ntxxwnnftl kh0nlw hf 0 mh1tlw, lhx0l Pk h0 !0ltw-p050 xh0nnwl p0hphn0l, thw nyntwm x0005wn htt fhllhw5nl 0xt5hnn:
    mqed Thw xh0nlw1 !0ltw 5tnwlf 5n 0wt05nw1 5n thw 15xt5hn00y
    mqmq Thw !0ltw 5n 0wmh!w1 f0hm 0ll 5twmn hn wh5xh thw p0hphn0l (NB. thw p0hphn0l, nht thw !0ltw) 5n p0wnwnt 0n1 0wpl0xw1 hy thw tnw0 npwx5f5w1 0wpl0xwmwnt; whw0w th5n 5mp0xtn 1w05!w1, 5twm-lw!wl fl0ln, ntxh 0n “pwn15nl 0tthh05n0t5hn”, thw nyntwm 0lnh 0mwn1n thwnw fl0ln.  In thw x0nw hf !0ltw-p050 p0hphn0ln, hnly thw p0hphn0l !0ltw th0t w0n nwlwxtw1 5n thw p0hphn0ln h0hwnw0 m0y hw xh0nlw1 (5f thw tnw0 w5nhwn th xh0nlw thw hthw0 !0ltw 5n thw p050, thwy mtnt 0xxwnn thw n0mw p050 p0hphn0l !50 th0t !0ltw 5n thw p0hphn0ln h0hwnw0)
    mq.. Thw tn0lw p0hphn0l 5n 011w1 th thw pwjwxtw1 P0hphn0ln l5h000y, 0lhnl w5th thw 0wjwxt5hn x0twlh0y 0n1 0w0nhn th0t 00w npwx5f5w1 hy thw tnw0 5n thw 0wjwxt5hn 150lhl.  Thw 0wpl0xwmwnt !0ltw th0t w0n 0ppl5w1 5n thw xh0nlw 5n 0lnh 0wxh01w1 pw0m0nwntly, nh th0t th5n x0n hw 15npl0yw1 th tnw0n whw0w 0pp0hp050tw 1t05nl 5twm xh15nl 0xt5!5ty
    mq!. An 0 0wntlt hf 0wmh!5nl thw xh0nlw1 !0ltw f0hm nhmw 5twmn, hthw0 tn0lwn hf thw !0ltw m0y 0lnh hw 0wmh!wed  If th5n 5n thw x0nw, 0n1 5f thwnw tn0lwn 00w 0lnh p0hphn0ln, th5n 0lnh 0wntltn 5n thw 0wmh!0l hf p0hphn0ln 5n!hl!5nl thw !0ltw 5n hthw0 tn0lw xh0nnwln (5t 5n w!wn 0 0wmhtw phnn5h5l5ty th0t xh0nl5nl 0 lhx0l Pk p0hphn0l m0y 0wmh!w 0 tn0lw 0n1 p0hphn0l fh0 thw n0mw !0ltw 5n 0nhthw0 lhx0l Pk; n5m5l00ly xh0nl5nl 0 !0ltw p050 m0y 0wmh!w hthw0 !0ltw-p050 tn0lwn/p0hphn0ln).  z5m5l00ly, thw 0115t5hn hf 0 nww !0ltw th 5twmn 0n 0 0wntlt hf thw xh0nlw 0xt5hn, m0y lwnw00tw nww p0hphn0ln 5n 0ny tn0lw xh0nnwl
    mq5. An w-m05l nht5f5x0t5hn 5n 1wl5!w0w1 th thw tnw0 whh x0w0tw1 thw p0hphn0l 0n1 th 0ny 0tthh05nw0n whh h0!w 0l0w01y 0tthh05nw1 thw p0hphn0l 5n thw wh0kflhw
    .. zww 5mplwmwnt0t5hn nhtwn hwlhw, tn1w0 “pwl0tw1 Infh0m0t5hn” 
    B0n5x Flhw 
     fl1l1fl1fl;lj0n1khfh0njkfhzgJKkf xhy0w0ttj 0nwhtj5y0w0hlwfklj0w0lklt5h5hn1fhlj1fhljn1fhlj1fhljwj50w0ytlt5w0j0w5t5
    ztfl!n1fllw0t!qww0wh00wwjh0f0n1jfhn1jkkwjhqw5t! tjt5w0yttwn1fln1ln1fn1') );
    END;
    I got the value as 3969.

    I tried with the same string. I know that the maximum length of the SQL string is 4000 and PL/SQL is 32767. but the thing is when am a length of the string in PL/SQL as less than 4000, then iwhy must not be run alongside SQL?

    Can you help me out on this issue?

    DB: Oracle 11g Release 2

    Thank you and best regards,
    Suresh.

    Suresh Mohan says:

    Outside chr (256), are there other characters of white space available?

    White space characters are listed on http://en.wikipedia.org/wiki/Whitespace_character.

    From the point of view of the old MS-MS-BACK/ASCII characters, a white space character was #256 as the chariot of normal space was #32. He was also a space compared to a difficult space.

    You need to look at the character set you use - ASCII is a set of characters in a single byte, and not the same thing.

    You can use the SQL DUMP() function to watch the characters in a string. For example

    select dump( my_string_column ) from my_table where ...
    
  • Difference between the static SQL query and dynamic SQL query.

    Hello

    Please explain the fundamental difference between static and dynamic sql queries. Please explain for example.

    Static: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/static.htm
    Dynamics: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/dynamic.htm

  • Creation of database without executing the script catproc.sql and catalog.sql

    Hello

    I created the database of towing without running catalog.sql and catproc.sql. Someone knows what's the downside to not run them?

    ARM

    You can run them at any time, and Yes, you must be connected as sysdba. In fact, it's in the scripts generated dbca.

    ----------------
    Sybrand Bakker
    Senior Oracle DBA

  • The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP by David Powers

    The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP by David powers:

    This book would help me learn more about Spry and Ajax and how applications may be lodged with them, if I have my e-commerce site works on a compiled C code cart (ShopSite) but supports scripts PHP server-side or is - this only for shopping carts based on PHP itself (like X-Cart)?

    I'm not sure. Someone please let me know if I can buy this book. Thank you.

    ahsenabro wrote:
    > 1. What I need to be a developer/programmer to learn from this book or
    > can a savvy entrepreneur can also get some gems out of it and direct sound
    > programmer?

    You don't need no prior knowledge of PHP or Ajax, but you must
    know the basics of HTML and CSS. As I say in the introduction, "You."
    don't need to be an expert, but do not have a curious mind.
    It teaches the basics of web site design, or he's trying to list
    each unique feature in Dreamweaver CS3. There are many other books
    to fill this gap. However, by working through this book, you will gain a
    in-depth knowledge of the most important features of Dreamweaver.

    > 2. I am interested in buying this book especially to implement cool Ajax/Spry
    > stuff on my e-commerce site. I wonder about PHP, because the content of the book
    > mentions making a PHP site. Now I realize this book isn't on purchases
    > carts, but the Ajax/Spry stuff can be implemented on e-commerce sites, right?

    The book provides detailed coverage of the features of Spry 1.4
    Dreamweaver CS3, which can be applied to any site. With minor
    adjustment, you can also use Spry 1.6. It is important to realize,
    However, the features of Spry/Ajax in Dreamweaver CS3 * cover of no
    asynchronous requests to the server. The ability to communicate
    asynchronously with the server has been added in Spry 1.6. If it has
    the asynchronous server calls and answers you are looking for, your
    programmer will need to dig into the documentation for Spry 1.6 on the
    Adobe Labs site and manually code it.

    The Spry features covered in the book are Spry, Spry UI widgets effects
    (menu accordion, tabbed and folding panels), Spry
    Widgets of validation and Spry XML data sets.

    > I just want to know if I can learn and implement Ajax/Spry apps on my
    > HTML/CSS-based simple pages, on a server that allows PHP scripts on the server side
    > but the pages themselves are not with the .php extension. This book is still going
    > apply?

    Yes. All Spry techniques can be used on any web page. This is not
    you have to be a PHP one.

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • CF8 Enterprise and MS SQL Server

    I need to transfer a CF8 Enterprise application off the coast of a MS Access database to a MS SQL Server existing database/environment (I guess I'm technically Piggy-Back my database in an 'existing' instance). I created my database of SQL Server, responsible for access to the elders of the base and is now looking to connect to CF administrator.
    I get the "java.sql.SQLException: [Macromedia] [SQLServer JDBC Driver] [SQLServer] Login failed for user (null)". Reason: not associated with a trusted SQL Server connection. "error. I've filled in the id and password, which causes this error. I checked, and the properties of the server (using SQL Server Enterprise Manager) and the validiated defined for authentication (SQL Server and Windows) mixed mode, but don't can't get further.
    Any ideas?

    I was able to verify that SQL Server has been using authentication in mixed mode (both Windows and SQL Server), and that TCP/IP is enabled and using port 1433.
    I had to create an ID local within SQL Server and then used this combination ID / password in the configuration of the data source in the CF administrator And then Bingo, that worked.
    Thanks for all you suggestions and patience. Oh, and I also bought a book from SQL Server 2000 to help me get through the code changes required between MS Access and MS SQL Server.

Maybe you are looking for