Wats wrong....?? can anyone help..
Hi Hi can anyone help?
i tried to extract the last row of item in the database by inserting a column call 'no' [in ascending order]....then extract out the one with the biggest value in 'no'. [effectively should be the last row of items]
however with the codes below.....it only allow me to extract out the first row of the data. .....how can i actually do in order to get the last row of data......PLEASE HELP ME!!
thank u
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:RMSdb");
java.sql.Statement statement = connection.createStatement();
java.sql.ResultSet res = statement.executeQuery("SELECT * FROM station9 " + "WHERE no = (SELECT MAX(no) AS maxno from station9)");
res.next();
String app_power = res.getString("S");
String voltage = res.getString("Voltage");
String current = res.getString("Current");
String real_pow = res.getString("P");
String img_pow = res.getString("Q");
String id = res.getString("no");
%>
<p align="center"><font face="Arial Black" size="4" color="#CC00CC">Voltage (r.m.s)
= </font><font face="Arial Black" size="4" color="#000000"> <%= voltage %>KV</font></p>
<p align="center"><font face="Arial Black" size="4" color="#CC00CC">Current (r.m.s)
=</font><font face="Arial Black" size="4" color="#000000"> <%= current %> KA</font></p>
<p align="center"><font face="Arial Black" size="4" color="#CC00CC">Apparent Power =</font><font color="#000000"><font face="Arial Black" size="4">
<%= app_power %>MVA</font></font></p>
<p align="center"><font face="Arial Black" size="4" color="#CC00CC">Active Power
=</font><font face="Arial Black" size="4" color="#000000"> <%= real_pow %> MW</font></p>
<p align="center"><font face="Arial Black" size="4" color="#CC00CC">Reactive Power =</font><font color="#000000"><font face="Arial Black" size="4">
<%= img_pow %>MVAR</font></font></p>
if ur question is getting the last row of a table then try this query instead
select * from emp where rowid in
(select rowid from emp where rownum<=(select count(*) from emp))
and rowid not in (select rowid from emp
where rownum<=(select (count(*)-1) from emp));
the above query will certainly return a single row and then u can if(rs.next()) and then extract the contents from the resultset....
Similar Messages
-
ok I have completed my apple ID and password which has worked on this site however on my ipad it tells me it is incorrect can anyone help
Have you checked Settings>Store>Apple ID?
-
Mail not working on my iPhone 5s and there is nothing i can do about it.. can anyone advise what to do
i also can add any mail addresses or open any mails ... latelty the phone is heating up as well... this all happend on Thursday morning, it was in charge over night and in the morning , no mail working nothing opening etc... and phone is hotter than usual when charging. and when connected to i tures it does not charge.
-
MY IPHONE 4 which has been working perfectly well has developed a fault on calls.
It will make calls OK and they can hear me perfectly but I CANNOT HEAR THEM AT ALL.
I have checked all the settings and cannot see anything wrong, can anyone help please!!Thanks for answering me. I tried what the help page said but still no luck. My son jut told me that his phone (same as mine) did the same thing and then resolved a little while later. I guess I might just have to wait and see.
-
My battery it's drained after I update my iPhone 4S with iOS 5.1 can anyone help me ?
After I install the iOS 5.1 the battery life is shorter what I'm doing wrong can anyone help me? Thank you
Sorry, I wasn't clear. Plug your iPhone into iTunes, select your device and in the summary tab, click "restore". You'll be asked if you want to backup, you can but you won't be restoring your phone from any backup. When the restore is done, set the phone up from new, not from backup. You'll have to resync EVERYTHING, but it will definately fix the problem.
-
Hi when I download email on my desktop at home my emails from new ISP disappear from my ipad, I must gave a setting wrong can anyone help me correct it ?
Hi Allan ,
Thank you for the reply,
I have just checked that my PC at home is a Pop3 account , and I used the same setting on my ipad and iphone.
Sorry , not being that enlightened on computers , what do I have to do ?
I'm not understanding
Thank you -
How can I get my itunes onto my new laptop? Do I need to download itunes again or can I just copy it? My ipod classic has since been soaked in water and does not work so I cannot copy from there. Can anyone help?
You should copy everything from your old comptuer to your new one.
-
I know my Apple ID and password is correct, but then I enter them to activate FaceTime it says one of them is wrong. Can anyone help?
iMessage and FaceTime are currently experiencing problems it's nothing that you are doing wrong. Just wait it out and check back for iCloud status.
http://www.apple.com/support/icloud/systemstatus/ -
Just bought the new iPhone4S yesterday, and my back camera isn't working/loading up. But my front camera works fine. What's wrong? Can anyone help?
I had the same problem- go to Utilities, General, Use Side Switch To, and change it from Mute to Lock Rotation- this solved the problem for me.
Good luck! -
I am not able to send my slide show from iPhoto because I entered the wrong user name (e-mail address) by accident and I dont see how to edit it. Can anyone help me out?
Try here:
iTunes Store: My credit card's security code or zip code does not match my bank's records
Then try contacting iTunes
Apple - Support - iTunes - Contact Us -
My emails wont go out . I believe I have my server settings wrong but cant seem to correct them . Can anyone help me with this problem ?
incoming and outgoing mail servers settings have to be correct to send.
cheers,
Jack -
We used to have BT as our broadband provider and then switched to Talk Talk. Since the switch we cannot send e mails although we are receiving them on the old address. We don't understand what has gone wrong. Can anyone help?
Thank you
EllieYou need to contact T-T and find out their SMTP settings ( which allows the sending of emails over wifi via your ISP) This info is probably on their website
I assume you do not have a 3G iPad .In which case go to the Apple site
http://www.apple.com/support/ipad/
where you should find very clear guidance on most issues -
It's saying my payment details on my App Store is wrong but there not, there right. It's not letting me download anything. Can anyone help me please it's doing my head in
Contact iTunes support: https://getsupport.apple.com/Issues.action
-
Hi I tried to contact with Sydney Apple store but impossible so far. Actually I found my Visa card been conducted 4 transactions in 7th may. I am in Auckland that time. It must be wrong deduction. Can anyone help me solve this problem.
My card is visa the 4 transactions are:
$19.48, $19.48, $12.98 and $ 25.97
otherwise I need report to police.
Also please forward it to the related department please
Thanks
Kathy
Please
<Personal Information Edited by Host>You are not addressing Apple here - this is a technical forum and we are all other users here.
You should also not post private info in an open forum - it is too dangerous - I've asked the hosts to remove the financial info and your email address. Anyone on this forum will reply to this thread - no need for an email address.
As for the activity: please call your credit card company immediately to report and question the activity. They can get in touch with the vendor (Apple). Calling the police will not be very helpful. -
Can anyone help me please. I can't receive emails. Keep getting message saying "incorrect username or password"
I have this same problem. Please can you tell me, did you solve yours and how? Thank you.
Maybe you are looking for
-
How to get all changes from directory beginning from some time?
-
Browser background not showing up on ipad or iphone
I have published a site and the browser background (which is an important part of my design) does not show up on my ipad or iphone when I visit the sight. I have published several websites from iweb and their browser backgrounds show up on my ipad an
-
Desperately need help here... I'm using mobileme to host my website that i create using iWeb 09 and i use my personal domain as well. It was just fine. Until a couple of days ago, i was learning how to use RapidWeaver to create my website and publish
-
How to load Windows in MacBook Pro
Once the MacBook Pro was initiated as iOS or maverick os can a windows os be loaded?
-
Alguien sabe como hacer un backup y resotore de una base de datos de Sap HANA gracias.