How to get the real SQL statement from a preparedstatement?

Hi,
I am trying to log the actual SQL sent to database by the preparedStatement. Since the original SQL I used to prepare the statement has a lot of "?" in it, after setting all the parameters in the preparedStatement, I want to get the final SQL statement executed. Is there a way to get it? Probably the SQL will depend on different drivers.
Thanks in advance.

Thanks, changhsu. I tried the tracing technique. But it only prints out the original SQL statement sent to the preparedStatement. The following is part of the log file:
======================================================================
--------NetDirect JSQLConnect Version:2.2708--------
2002-04-10 14:23:54.818 (1) Connection attempt number 1 Connection ID:1 for host:perseus
2002-04-10 14:23:55.429 (1) JSQLConnect(2.2708) Trial license - expires on:Thu Apr 25 17:47:32 CDT 2002, unlimited connections
2002-04-10 14:23:55.449 (2) Connection allocated from pool ID:2
2002-04-10 14:23:55.72 (2) [Thread[Thread-6,5,main], IO:88cb4, Dbc:1346]] SELECT SHARED_DRIVES FROM EPM_PREFS WHERE PRODUCT='PE'
2002-04-10 14:23:57.913 (2) Connection closed and returned to connection pool ID:2
2002-04-10 14:23:58.193 (3) Connection attempt number 2 Connection ID:3 for host:perseus database:epm20 SQL6.5:false
2002-04-10 14:23:58.203 (3) [Thread[Thread-6,5,main], IO:88cb3, Dbc:1347]] use epm20 set quoted_identifier,ansi_null_dflt_on,ansi_padding on set textsize 2147483647 set transaction isolation level read committed set implicit_transactions off
2002-04-10 14:24:00.356 (4) Connection allocated from pool ID:4
2002-04-10 14:24:01.168 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] PreparedStatement::prepare stmt:SELECT PASSWD FROM RESOURCE_INFO WHERE USER_ID=? AND DELETE_FLG IS NULL
2002-04-10 14:24:01.448 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_prepare
2002-04-10 14:24:01.488 (4) [Not Loged In@localhost, IO:88cb2, Dbc:1347]] RPC:sp_execute
=======================================================================
I did not try to trace in SQL Server 7. I will have to find out how to do that first.
Thanks again.

Similar Messages

  • How to get the real client ip from HttpClusterServlet?

    Hi All,
              WL 6.0 sp2 on Linux.
              When HttpClusterServlet is used, invoking HttpServletRequest.getServerName()
              will return the server name of the proxy server where HttpClusterServlet
              installed,
              rather than the actual client's ip which we are interested in.
              Anybody knows how to get the correct client ip through the proxy server? Any
              workaround? Or does a patch exist?
              Any help will be appreciated,
              Lynch
              

    Sorry I mean HTTPServlet.getRemoteAddr()
              "Lynch" <[email protected]> ¼¶¼g©ó¶l¥ó
              news:3baea0c5$[email protected]..
              > Hi All,
              >
              > WL 6.0 sp2 on Linux.
              >
              > When HttpClusterServlet is used, invoking
              HttpServletRequest.getServerName()
              > will return the server name of the proxy server where HttpClusterServlet
              > installed,
              > rather than the actual client's ip which we are interested in.
              >
              > Anybody knows how to get the correct client ip through the proxy server?
              Any
              > workaround? Or does a patch exist?
              >
              > Any help will be appreciated,
              > Lynch
              >
              >
              

  • How to get the real-time data from a CCD camera in labview?

    I am going to setup a monitor system and need to acquire the intensity of each pixel at each second from a CCD camera. Also, I need to to some simple calculations with these real-time data at every moment to get my finanl output in this monitor system.
    How may I do this using Labview?
    Thank you very much.
    Kai

    We don't have special powers, so we can't guess if you have Imaq Vision or not, if your camera comes with a LabVIEW driver, if it has an USB interface, or firewire, or a dedicated NI card, if you just want to detect a move, or a change in intensity, etc...
    So, try to be more specific with your question, that will helps a lot  
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to get the failover partner name from C++ client

    Hi All,
    I have configured the mirroring session for my application.
    I want to modify the connection string with failover partner name.
    Could any one please let me to know how to get the failover partner instance from C++ client dynamically.
    Thanks,
    Prasad.

    Are you looking for this?
    http://www.connectionstrings.com/sql-server-2012/
    http://stackoverflow.com/questions/25534972/auto-failover-multiple-connections-to-mirror-database-when-principal-goes-down

  • How to get the backup of photos from  i cloud id ?

    plz provide me the answers as soon as possible.

    BALAJI_PRASANNA wrote:
    Hello,
    I am very new to Labview. Í have an image of an LED and wanted to find the luminance value. I got the luminance image from the IMAQ ExtractSingleColorPlane but the value is not displaying. I just wanted to know how to get the value of luminance from the IMAQ ExtractSingleColorPlane. I have attached what i have done below.
    Thanks in advance.
    Before learning about LabVIEW, learn about images.  An Image (in LabVIEW) is a "representation of an image", that is, the wire itself doesn't really have a "value", but "points to" a collection of data that can be "imaged" (i.e. looked at as through it were a picture), "manipulated" (for example, extracting a color plane, basically getting the "red channel", an image looking as through it were viewed through a red filter), and possibly returning arrays of numbers representing the intensity of the light at a certain position in the picture.  
    BS

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • HT201210 I had the ios 7 beta and now I cant figure out how to get the real update

    I have the IOS 7 beta currently on my phone however now I can't figure out how to get the real update

    Be sure to log into developer.apple.com using your developer ID. there should be support on these issues.

  • Anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999..

    anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999.. many thanks :-)

    They show in the camera roll, just not your computer?
    Have you checked every folder that is in the DCIM folder?

  • How to get the real reason of bdb's err?

    The application used some bdb's c-funcs, and get a err-log like below:
    PANIC: fatal region error detected; run recovery
    txn_checkpoint: log failed at LSN [1 6638626] DB_RUNRECOVERY: Fatal error, run database recovery
    How to get the real reason of the err?
    I tried to using db_printlog. But it print all the info of the log file. Another question is:
    How to get the info of exact place?

    The question is still there. Could someone help me?

  • How to Get the excel sheet formula from the server side into the j2me app?

    How to Get the excel sheet formula from the server side into the j2me application?
    Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
    But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
    So how to get the excel sheet formula frome the server side into j2me Application...
    Plz guide me to solve this issue...
    thanks & regards, Sivakumar.J

    You should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to get the byte[] size dynamically from the StreamMessage object

    Hi all,
    Using JMS, I am receiving the FDF file as StreamMessage from the queue and attaching it to the PDF file which is present in the local system.
    For that, I have written the code as follows:
    {color:#0000ff} Message msg = jmsTemplate.receive();
    if(msg !=null && msg instanceof StreamMessage)
    StreamMessage message = (StreamMessage) msg;{color}
    {color:#ff6600}//hardcoded the byte array size value
    {color}{color:#0000ff} byte[] bytes = new byte[{color:#ff0000}856{color}];
    System.out.println("read msg="+message.readBytes(bytes));{color}
    {color:#0000ff}PdfReader pdfreader = new PdfReader("D:\\Managing_Workflows_No_Comment.pdf");
    PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("D:\\12345.pdf"));
    FdfReader fdfreader = new FdfReader(bytes);
    stamp.addComments(fdfreader);
    {color} {color:#0000ff} stamp.close();
    {color}{color:#000000}The above code is working fine except with the hardcoded of {color:#ff0000}byte array{color}{color:#ff0000} size value{color} which is given in {color:#ff0000}RED{color} in color.
    Can anybody know, {color:#000000}*how to get the byte[] size dynamically from the StreamMessage*{color} object ?
    Any help would be highly beneficial for me !!!!
    Thanks and Regards,
    Ganesh Kumar{color}

    When you create your stream message you could add an property to your message, something like streamSize that would contain the number of bytes in your stream message. Then you could get this property from the message before declaring your array.
    Tom

  • How to get the real longtitude latitude of a pixel  from Mapviewer'spicture

    I have application that will show a map returnning from MapViewer, and in my request I have :
    1. MapSize:
    2. MapHeight:
    3. MapWidth:
    4. CenterX:
    5. CenterY:
    when user click on the picture I receive X, Y in coordinate of PictureBox so How to change them to the real longtitue, langtitude.

    Example: I have
    MapSize=8
    width=500
    Height=500
    Center X= -122.433 (longtitude)
    Center Y= 37.7878 (latitude)
    When I send a request I will receive a map reprented in my monitor with 500*500 pixel?
    I click on a pixel in that picture and i get the X=350, Y=340 (compare with TopLeft pixel of map is (0,0)).
    So how can i get the real longtitude, latitude of that pixel.
    In document i see 1 inche =72dpi --> so a real height of my map = 500/72=6.94 Inches
    And the problem is how i caculate the map scale.

  • How to get the real name of a user from WFSYST-AGENT

    Hi,
    I am retrieving the WFSYST-AGENT value (which correspond to the US<user_id> of the agent responsible of a task) in a container variable in my workflow.
    I would like to get the real name of the user represented by WFSYST-AGENT. How should I do that ?
    Thanks in advance for your help.
    Thibault

    Hi,
    Take the user name and write a select for database table USER_ADDR fetching fields NAME_FIRST and NAME_LAST by passing BNAME = username.
    Regards,
    Jayesh

Maybe you are looking for

  • Time machine won't back up

    I just got a new MacBook Air with Lion.  On my old Mac, I thought I remembered that Time Machine would only backup files that have changed since the last time I backed up my drive.  I used Time Machine to transfer my old desktop to my new Air.  Today

  • Why my  Apple ID has been disabled

    why my  Apple ID has been disabled

  • Limitation for values in Multi Select in prompts?

    Hi all...I have a dashboard with a report and a prompt . I have multi select enabled in prompt. I defaulted that prompt to a single value. I have 1700 values in multi select. The user wants to select all. When user selected all and hit GO on prompt,

  • Power supply temperature: is 85'C normal?

    Sorry, I am kind of all over the place - not sure where to post the question. My iMac (24", 10.5.8) has been heating up at the top left corner, where the power supply is. I took it to the Genie bar and they said it is normal to feel warmth in that co

  • Data types used in a sub VI - selecting the correct input and output types?

    data types used in a sub VI - selecting the correct input and output types? I can never work out how to choose an input or output format for Subvi's. I want to create a SubVI for the code in red. I needs an VI Server Reference compatible input and an