How to print Integrity sql in the preparedstatement?
How to print Integrity sql in the preparedstatement?
Connection conn = null;
String sql = "select * from person where name=?";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setObject(1, "robin");
ps.executeQuery();
i'm wants print Integrity sql.
For example:select * from person where name='robin'
How should I do?
thanks a lot!
PreparedStatement doesn't offer methods for that. You can write your own implementation of PreparedStatement which wraps the originating PreparedStatement and saves the set* values and writes it to the toString().
If needed, myself I just print the sql as well as the values-being-set to the debug statement.Logger.debug(query + " " + values);
Similar Messages
-
How to print/store in file the ref cursor in pl/sql block ?
How to print/store in file the ref cursor in pl/sql block ?.
How to print/store in file the ref cursor in pl/sql block ?.You question is quite confusing?
So, i'm providing link in this manner.
For RefCursor,
http://www.oracle-base.com/articles/misc/UsingRefCursorsToReturnRecordsets.php
http://www.oracle.com/technology/oramag/code/tips2003/042003.html
For UTL_FILE,
http://www.morganslibrary.org/reference/utl_file.html
Regards.
Satyaki De.
Updated with new morgan library link.
Edited by: Satyaki_De on Feb 24, 2010 9:03 PM -
Please help : How to print a matrix from the console...
Hi..
Please help:
How to print a matrix on the console , but i want to take all the input from the console.. like...
if the matrix is of size...
mxn
where
m : row
n : column
and the all the elements of the matrix from the console it self... .
Please help...Thanks...
I am able to print the elements of the array but i am not able to assign those values to the array ....
How to do that...
I just did a little change in my code...
import java.util.Scanner;
public class CreatingAMatrix {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.print("Enter the number of rows: ");
Scanner scanner1 = new Scanner(System.in);
int m = scanner1.nextInt();
System.out.print("Enter the number of coulmns:");
Scanner scanner2 = new Scanner(System.in);
int n = scanner2.nextInt();
System.out.println("The size of the matrix is : " +m+" x "+n );
int[][] a = new int[100][100];
for(int i=0;i<=m;i++)
for(int j =0; j <= n; j++)
Scanner scanner3 = new Scanner(System.in);
int o = scanner3.nextInt();
System.out.println();
for(int i=0;i<=m;i++)
for(int j =0; j <= n; j++)
System.out.print(a[i][j] + "\t");
System.out.println();
}I am getting an output as this
output:
Enter the number of rows: 2
Enter the number of coulmns:1
The size of the matrix is : 2 x 1
1
2
1
2
3
5
0 0
0 0
0 0
how should i assig those input values to my array..
Please help -
How to start Integration server with the user XISUPER
Hi,
How to start Integration server with the user XISUPER?
Regards,Mahesh,
In the post installation document, under Creating User XISUPER,
I see the following,
1.You must now log on to the Integration server host with the user XISUPER, to switch the initial password to a valid password.
2.You must restart the J2EE engine to transfer the user creation to the J2EE immediately.
I am unable to proceed here.Can you please help me to resume the post installation steps ?
Thanks, -
How do I use Sql hints in PreparedStatement?
Hi,
I am trying to use a sql query which uses Oracle hints to optimize the query. I am using the ojdbc drivers from Oracle. I am using the PreparedStatement (Java 1.4) to execute this query, but it returns an empty resultset. If I remove the hint, then the query works fine using the PreparedStatement. Does anyone know how to make sql hints work using preparedstatement. I tried it with Statement object and that works (ie. the hint works and returns rows as expected).
The query is as follows:
select /*+ ordered
use_nl(ri ma)
count(*),
ma.columnName
from table1 ri,
table2 ma
where ma.columnName2 = ri.columnName2
and ma.column3 = 1
and ri.column4 = 66
group by ma.columnName
I tried escaping the /*+ but that also didn't work. Any help would be appreciated.
Thanks in advance,
ParagMust be an old database.
Presumably you tried it in sqlplus and it worked both ways. If not then nothing you do will make it work in java.
Other than that my quess would be that it has nothing to do with the select.
Some possibilities.
1. You are eating exceptions.
2. You are not running the code that you think you are. -
How doi print Any variable at the end of page in ALV report?
Hi,
Anyone can tell me that How do i print Any variable at the end of page in ALV report?
Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.Hi,
Go through these links
Thread in sdn regarding FOOTER IN ALV
[ALV FOOTER;
Wiki in sdn regarding HEADER AND FOOTER IN ALV
[https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
Header and Footer in ALV
[http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
Hope this helps.
Thank you,
Pavan. -
How to print window contents at the backside of a page(In scripts&smartform
Hi,
How to print the window contents at the back side of a page
in scripts and smartforms?
regards,
prajwalaCreate a new page with the window and select "duplex" printing. Use Search button to get more information.
-
How to print Adobe Forms without the black/gray backgrounds in the side columns
How can we print Adobe Forms without the black/gray backgrounds in the side columns? We are wasting a lot of ink printing out these forms and would like to have simply black ilnes to distinguish columns and black lettering, but no background colors. Any help would be appreciated. Thanks.
I am not positive what you are printing from but I am thinking it is from the View Responses tab with a response row selected and then shown in "Detail View" and that the column of field names has a dark grey background...
To change the color of the column headers select the row of headers (do this by clicking on the first dark grey header field and then scroll to the last one and shift+click on the last one), then in the "Text" tools change the text color to Black and the Fill color to white:
(Selected the header cells)
Changed the text/font color to black and the fill color to white
Now you can see the detail view does not have the dark grey.
Thanks,
Josh -
How to print all information in the contacts
does anyone know how to print a concise list of everything in your contacts ?
Hello emerykt
You should be able to print a list of contacts and then all you have to do is select the fields that you want to print.
Contacts (Mavericks): Print contact information
http://support.apple.com/kb/ht1766
Regards,
-Norm G. -
Adobe Reader 10: How to print a PDF ignoring the red characters?
Adobe Reader 10: I want to print a PDF ignoring the red characters.
I am a school teacher. I would like to print PDF answer key files (answers in red) without the answers for the students to work on. How can I suppress the red characters during print and print only the black characters?I don't think this is possible with Adobe Reader. You would need a program like Acrobat or Illustrator to hide these text portions.
If this is a one-time task, you could use the 30 day trial of Acrobat: http://prodesigntools.com/adobe-acrobat-xi-pro-standard-reader-direct-download-links.html - make sure you follow the Very Important Instructions on that page. -
How to print a field on the last page of Smartform?
HI FRIENDS,
I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
SYSF BUT NOT worked.
Thank you.
ROGERIO VAZHi,
Goto the conditions tab of that window and enable the check box for Only after the end of main window.
This will surely print your field in the last page.
try this and get back to me if any issues.
Regards,
Anand. -
How to print a field on the last page of Smartform with more of 2 pages?
HI FRIENDS,
I NEED TO PRINT ONLY ONE FIELD IN LAST PAGE OF FORM SMARTFORM
HOW DO I CHECK last page. I tried WITH THE FIELDS OF TABLE
SFSY BUT NOT worked.
The form has more of 2 pages.
Thank you.
ROGERIO VAZHi ,
You dont have to hard code anything to achieve this functionality,
just create a window and in that window define a text element to print
that variable.In the conditions tab of that window check the check box
"only after end of main window".i think you might have used a main window,
so irrespective of the no of pages the smartform prints,it always displays that
field in the last page of the smartform.
regards,
srikanth. -
SAPSCript how to print a comment at the end of main window on first page?
In SAP Scripts, How do I print a comment at the end of the first page (I have several pages of data) in the main window?
- Venhi
good
yes we can put condition.....to display the footer window get printed after all data in main window gets over.........................assingn u r footer window to next page [ i.e u r second page] ...and write the condition
In such senario no need to use a window for footer.
In the Script form:
-> In the Main Window itself after all the main data create an Element.
-> Use BOTTOM and END-BOTTOM; write your footer information between them.
In your Driver Program:
-> After printing all the data (means after passing to form and before closing the form) call one WRITE-FORM with the footer element.
I'm sure it will work.
f u r not interested to change the print program. Then simply insert simple code in the footer wondow.
now insert this code in ur footer window
IF &TTXSY-PAGE& = &SAPSCRIPT-FORMPAGES&.
*all code in footer goes here.
ENDIF.
&TTXSY-PAGE& holds the page number of current page.
&SAPSCRIPT-FORMPAGES& holds total form pages.
This will work.
write this code then the footer will be printed in last page itself
/: IF &NEXTPAGE& EQ 0
whatever footer you want.
/: ENDIF
You need to create an element in the MAIN window. You can do it in two ways:
1. In SE71, you can create:
/:E FOOTER
/:BOTTOM
Text
/:ENDBOTTOM
In the print program, just call this element.
2. In you print program, populate parameter type = BOTTOM in FM, WRITE_FORM.
Ex.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FOOTER'
type = 'MAIN'
window = 'BOTTOM'
EXCEPTIONS....
However, if you issue new page having new header data. Thus, new item data. And if it will exceed more than 1 page, the footer will still appear. To solve this, you need to create a new element in MAIN. Ex. INIT_FOOTER. It just contains the following:
/:E INIT_FOOTER
/:BOTTOM
/:ENDBOTTOM
Call this after passing all item data.
reward point if helpful.
thanks
mrutyun^ -
How to print out answers using the form I created
I created an application form for my company. People have submitted their applications, but I do not know how to print them out.
Is there a way to copy the answers into the form and print that? Or something like that?
I cannot just print the answers because it's over 100 pages and would be disorganized.
I basically just need to know how to print out the form I created with the respondants answers.
ThanksHere is what you can do...
Open the form file
Go to the View Responses tab
Select the View menu in the upper right corner of the UI
Select the Details View menu item on that menu
The Details View pane will open on the right side of the window
At the bottom of that pane there is a set of buttons
The first button let's you print the detail view of the currently selected response
The last button labeled Export will create a PDF file of the selected response
Is that what you were trying to accomplish? I'll admit that we need to make print and export to PDF more discoverable and easier to get to - that was too many steps
Randy -
How to print a receipt from the iTunes store, I did not receive an email.
How can I print a receipt from the iTunes store when I did not receive an email.
The following may help: iTunes Store: See your purchase history and web order numbers
Maybe you are looking for
-
As you can see Off at the top of the pic is faint and I cannot find a way of getting to it to change it to On. If can change it to 'On' I presume I won't get the login screen/page after turning on the Mac??
-
Firefox updated - forced to install new Flash - doesn't work, but does in other browsers
Auto-update to latest Firefox. Loaded, then warned to load new Flash. Done. It works in my other browsers fine, but only shows me non-functioning images in Firefox. (When I go to YouTube). They don't appear at all in one of my sites - but work fine i
-
Hi All, I am trying to run a simple PDF scenario, but I keep getting this annoying error. #1.5#0004238869580066000000560000026C0004380CB5C766C0#1187527148408#com.sap.tc.webdynpro.sessionmanagement#sap.com/tc~wd~dispwda#com.sap.tc.webdynpro.sessionman
-
I have tried several times to install Adobe flash player 11.0.1.152. It keeps stating to shut off Mozilla. How do you shut Mozilla off?
-
TA22652 how can i find out the 5 computers that I have authorized with my account?
i know that i have 5 computers authorized, but how can I find out what computers i am authorized on?