UTL_HTTP parameter with escape character

Hi guys

We implement our database to send SMS via a footbridge and to have a little problem with parsing the message to the htl_http package. We use the script below to send SMS

DECLARE
    HTTP_REQ      UTL_HTTP.REQ;
    HTTP_RESP     UTL_HTTP.RESP;
    URL_TEXT      VARCHAR2(32767);
    URL VARCHAR2(2000);
    
    SMS_MSG VARCHAR2(160) :='This is a test message sent from Oracle Database';
    
BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    
    URL := 'http://mysmsgateway/alerts/api/web2sms.php?username=test&password=test&to=9999555555&sender=ORASMS&message='||SMS_MSG;
         
    UTL_HTTP.SET_HEADER(HTTP_REQ, 'User-Agent', 'Mozilla/4.0');
    HTTP_RESP := UTL_HTTP.GET_RESPONSE(HTTP_REQ);

    -- Process Request
    LOOP
        BEGIN
            URL_TEXT := null;
            UTL_HTTP.READ_LINE(HTTP_RESP, URL_TEXT, TRUE);
            DBMS_OUTPUT.PUT_LINE(URL_TEXT);

            EXCEPTION
                WHEN OTHERS THEN EXIT;
        END;
    END LOOP;

    UTL_HTTP.END_RESPONSE(HTTP_RESP);
END;

Now our problem is, while the SMS is received, we get just 'this' which is the first word of the variable SMS_MSG. It is because of the management of escape character, we believe. How to "escape" this problem?

Any suggestions?

Kind regards

REDA

Something like this:

URL: = 'http://mysmsgateway/alerts/api/web2sms.php?username=test&password=test&to=9999555555&sender=ORASMS&message=' |
       UTL_URL. Escape (SMS_MSG, TRUE);

Tags: Database

Similar Questions

  • Deactivation of the PowerShell escape character

    I need to use Get-VMGuestNetworkInterface on about 100 mV.  They are members of domain created from the same template with the same local administrator account.  Unfortunately, the local administrator password using the 'character.  The "character is the PowerShell escape character.  The escape character will not allow itself be included with a string value, so when I try to pass the parameter - GuestPassword, it does not include the "character, the password is incorrect, and the authentication will fail.  Anyone know who to use the "character in a string literal?

    Depends on hwo you pass the string between apostrophes, the backtick didn't need to be escaped (' pass'word ').

    Quotation marks, use the back-slash ("past" word")

  • DataPump the QUERY parameter with string values? -SOLVED

    All,

    I'm trying to specify a query to the datapump API parameter but can't seem to get my correct single/double quotes so that it can work. I can successfully use the QUERY parameter with something like QUERY = table: '"number_column = 6" ' but NOT with something like QUERY = table:'"string_column ="value"" "

    I tried different versions of the single/double quotes, but all fails with slightly different errors. Someone at - it an example where a string value is used with success?

    Thanks in advance. Oracle 10.2.0.3.0 - AIX 5.3

    So after reading some other reviews on another thread - I tried this and it worked:

    QUERY = table:------"where string_column = 'value\' \' \

    Looks like you have escape all single/double quotation marks for this parameter

    Published by: potter_geek on August 31, 2009 10:47

    Hello

    Use the parameter file or if you run expdp command-line use escape character '-' (backslash) in this case.

    Concerning
    Anurag Tibrewal.

  • Before escape character point in the dn entry after provisioning OID

    Our users IOM are automatically provisioned to OID using OID box connector. Everything works well except this issue.

    When the value of "User login" IOM contains the character (called BILLY. (BOB), the dn entry in OID is created with an escape character (dn: uid = BILLY\.) BOB, cn is users, dc = abc, dc = com).

    Example:
    'User Login' IOM = BILLY. BOB
    :
    :
    OID entry created as
    DN: uid is BILLY\. BOB, cn is users, dc = abc, dc = com
    First name: Billy
    UID: BILLY. BOB
    CN: Billy Bob
    :
    :

    Note that the uid does not get the escape character, only the dn value is getting affected.

    Thanks in advance!
    Kabi

    You must remove. in the definition of research, which comes with STANDARD connector.

    Re: OID Connector.User Id includes "------" seen by DOHAD

  • escape character must be the string of length 1 (error ORA-01425)

    Hi all!

    I get this error message (SQL error: ORA-01425: escape character must be the string of length 1) when querying an oracle 9i database with:

    SELECT * FROM table WHERE column LIKE '%' ESCAPE ' \';

    Bar which makes it a double backslash (included with apostrophes) would solve the problem, however, with this change, the request is more executable in a 10g database.

    Is there a way to make the executable SQL above (with a single backslash escape) code in both (and latest) versions, without changing it? Maybe a server definition database that could solve this problem...

    Suggestions for the problem described are greatly appreciated!

    Thank you

    col2 NVARCHAR2 (100)

    OK, you should have mentioned before using unicode ;)

    However, should not always identical fields be treated identically in any database?...

    Yes, they should :(

    In any case the escape string should obviously be treated as unicode so the right way, I guess, would be

      select * from mytable where col2 like N'%' escape N'\'; 
    

    Note the front N ' \' to make the unicode string.

  • search for file names with tilde character

    trying to locate all the file name containing the tilde (~) character. It is obviously special for the search as a search looking for files with this character corresponds to each file. I can't find the mechanism to quote the tilde so that Windows will search for files containing the tildes in name literally.

    You expect to be easy to find the answer, but then I found others asking the question. I can't find the answer.

    See the following article on research in Vista: http://www.vistax64.com/tutorials/75447-search-options.html.  I ' ts faily basic and probably does not cover what you need to know to make the research you are tyring to do.

    Here is an article on research options in Vista: http://www.vistax64.com/tutorials/75451-advanced-search.html.

    Here is an article on the use of advanced query options to improve searches in Vista (I think yuu might find your answer in this one): http://www.vistax64.com/tutorials/158288-advanced-searches.html.

    Here is an article with a number of advanced search options and how format the queries that may be helpful: http://windowsteamblog.com/windows/archive/b/windowsvista/archive/2007/05/09/advanced-search-techniques.aspx.

    I hope this helps.  If not go back and I'll try to find more resources or attempting to do myself to see if I can understand how do.  It seems that Mr. Wizard answered the question before I coulld end my post. The anwer to the 'why' is probably contained in the above items.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • What is ORA-29049: unknown record when using UTL_HTTP.begin_request with the HTTPS protocol?

    Hi, here is my question:

    The application context:
    Oracle 10.2.0.4.0
    Operating system: AIX Version 5.3

    A stored procedure executes queries on the web in order to call a Webmodele.
    The used protocol is httpS.
    A certificate has been defined with the Oracle Wallet (orapki) utility

    Problem:
    For several days, making the procedure call webservice no longer works.
    The package has been changed on the database, no patch has been applied on the machine.

    The call to the procedure of utl_http.begin_request with the HTTPS url returns the following error:
    ORA-29049: unknown record
    ORA-06512: at "SYS." UTL_HTTP", line 1027
    ORA-06512: at line 16 level

    A small piece of code/oog is attached, see photo log_sql_ws_call.jpg

    Question

    Can you explain to me the meaning of the error ORA-29049, what may be the cause of this unexpected error and most importantly, how to fix?


    Thank you for your help.

    Finally, it happends only a few days before the described error (ORA-29049), SSL v2 has been disabled on the target domain (SSL v3 has been disbled 1 year ago already).

    The reactivation of SSL v2 solved the ORA-29049.

    Now, I'm dealing with the ORA-12537: TNS:connection closed.

  • When you choose a webcam for use with host character, should what features I look for?

    When you choose a webcam for use with host character, should what features I look for in the webcam? For example, choose the one that captures full HD (1080 p)? Or any webcam will work? I just want to be able to make the motion capture process as easy as possible, so I think I must look over the webcam plug before you buy.

    Any webcam should work, but a higher resolution can improve the accuracy of tracking. Adequate/same lighting on your face is too important.

  • Problem with Adobe character animation

    I have a problem with Adobe character, when I open it (for After Effects and a free program), I got an error message: "License failed because an asset after the installation of 2015 CC effects could not be found. If please reinstall After Effects and launch it to sign in the creative cloud. ' Y at - he moved to a file or a license to copy file... Please help me I can not use the character animator! THX!

    Try to connect then back in creative cloud. See this FAQ: FAQ: what does the error Licensing "Licensing failed because an asset after the installation of 2015 effects CC not found." mean?

  • Cannot bind the portlet parameter with the webcenter portal page setting

    Hi all

    I'm tying portlet parameter with the setting of the page so that I can reach some needs of the company.

    Here's what I did,

    In my producer of Portlet application:
    (1) created standards based portlets (jsr 286) with view.jspx and edit.jspx with the rest of the things being default.
    (2) in my portlet.xml created two parameters and receives these parameters to the portlet created above.
    (3) in the added view.jspx output torque label adf elements in the page.
    (4) deployed this integrated weblogic server.

    In my WC portal application:
    Created a new page and add the portlet to this page (WSRP connection already exists).
    deployed applications of portal on the server integrated.

    In page editing mode, I added a parameter (Param1) and certain value (constant) default page added.

    What I want is this:
    What value of Param1 is a view first label of output and
    What value of Param1 is display two second label output.

    I use jdev 11.1.1.5.0 with integrated weblogic server.

    (1) I do not set the value in the portlet code. This is supported by the application of Portal WebCenter! When you insert the portlet on a page and Runtime edition mode, press the button customize (an icon of Gable at the top right of the portlet). The first tab is the tab settings of the portlet. This tab is generated by the infrastructure by reading the specifications of portlets. As soon as you change the value it and press ok or apply, the value can ask of the portlet code I provided. That's why you can't find a code to set this value.
    (2) responded to 1 I guess :)
    (3) also partially answered 1 :)
    To change the value of a second, you must customize the portlet. This is possible by logging into the portal. You should see a pencil icon in the upper right of the portlet. When you click on it, it will open the page of edit.jspx that can be used to set preferences, as you can see in the code.
    Note that edit.jspx and the code to handle fields in the portlet bean are generated by Jdeveloper. I've not written. This is done by JDeveloper when you add a preference during the portlet Wizard.

    I hope this helps.

  • In Lr 3.6 How can I search for filenames ending with a character #?

    Text search seems to treat the character # somehow mysterious way not to select files that have it in their name. I can't find any explanation for this in the documentation. Is there some other characters that I have to put next to the # do register as a normal character?

    My problem is that I need to find a bunch of files in my catalog whose names ending with a character #. I want to rename these files in a way that removes the end #, but no other characters # separating the key elements of the file names. If I can't do it then I want to select this group of files and to produce for them .xmp files (I don't use normally .xmp files) so that I can rename files outside of the Lr and import them to new complete with all settings and metadata.

    I dare say that I wouldn't choose to name the files in this way if I started again but I have too much change now.

    There is also too much for me to want to rename them, individually, in the metadata Panel, if I can avoid it.

    I use Lr 3.6 Mac OS x 10.6.8

    see you soon,

    -Alan

    Your files names really end by ' # ' (e.g. img123.jpg #) or is it the part without the extension that ends by "#" (e.g. img123 # .jpg).  If the latter, then that this Smart Collection criteria will identify the:

    File name contains #.

    If the first, then as you have noticed, smart Collections will not work.  But you can use the plugin to any filter, this criterion:

    Name of the file ends by #.

  • How to use the escape character in the update statement.

    Hi all

    I'm trying to update using the following table update statement in sql, but whenever he asks me to enter the value 'and' below sql.
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
     WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');
    Please let me know how to use escape character syntax or let me know if there is no alternative.

    Thank you
    Vishwas

    If you use SQL * more then use SET DEFINE OFF.

    Also, you can do something like this

    UPDATE xyz_xyz
       SET NAME = 'ABC' ||'&' || 'PQR'
     WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C' ||'&' ||'PQR');
    
  • Encryption with escape characters - «»

    Hello

    I encrypt a password to put in a table in mySQL db.  It seems to strip the character '-' it's an escape character.

    Encrypted entered PW: 0_ZGA68!, N4AE ([neckl @] * H (this is the password that is encrypted in the login page))

    Table password: 0_ZGA68!, N4AE ([T @] * H (I compare it to what is in the table - see the "------" is missing))

    PW does not match what is in the table.

    Is it possible that this is the case, he sees "-@" in the encrypted string and escapes it is just the '@' that ends up in the chain that goes into the db table and it can no longer match up to the PW under review?

    If so, not funny...

    Thanks for everything/solutions, advise

    Lee

    That you realize apparently the backslash-is a special character in MySQL, the escape character. So you should escape to the it.

    You can do this, for example, by manually adding a supplement------each------yourself, like this

    insert into myTBL (pw)

    values (' #mySQL_escaped_PW # ')

    or leaving the ColdFusion to do it for you, as 12Robots noted:

    insert into myTBL (pw)

    values ()

  • By the way the dynamic parameter with the URL while submitting the form

    Hello

    I the data in xml format in a servlet using the button send the form. I also need to pass a parameter with the URL. But the value of this parameter changes during execution based on the value of a particular field in the form. Please help me with it.

    Thank you.

    Here is an example that shows what I think you want. The code is on epreSubmit th of the button event. I put messages showing what the button submit it URL is... before and after we change. You can delete these messages when make you it work as you want.

    Hope that helps

    Paul

  • Query of queries (QofQ) escaped character problem

    Hi all

    I am trying to run a query or queires (QofQ) and I do a LIKE comparison which finds support ([]) characters in the string, but ColdFusion ignores the media. How can I escape the character of support? So far, I couldn't escape the percentage based on the Docs sign live ColdFusion. The error message I get when I run the query below is:

    «"" "Invalid escape sequence.»»»" Pairs of valid sequence for this escape character are: "------%", or "\".

    This is the query:
    < cfquery dbtype = "query" name = "getLogs" >
    SELECT *.
    OF GetLogs
    WHERE Description LIKE '\[User:#UserID#\]% %' ESCAPE ' \'
    < / cfquery >

    Thanks for your help!

    What of it?

    WHERE my Description LIKE ' % [[] user: #UserID #] %'

Maybe you are looking for