473,387 Members | 3,684 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to store DB value into a Variable ???

Hi all,
Does anyone know how to store the value retrieved from
Expand|Select|Wrap|Line Numbers
  1.  PreparedStatement preparedstatement=connection.prepareStatement("select MAX(TOKEN_ID)from DB_TEMP");
into a variable, so that i can use it in my jsp code??


Thanks in Advance!
Akshay
Jun 3 '08 #1
2 1566
JosAH
11,448 Expert 8TB
Hi all,
Does anyone know how to store the value retrieved from
Expand|Select|Wrap|Line Numbers
  1.  PreparedStatement preparedstatement=connection.prepareStatement("select MAX(TOKEN_ID)from DB_TEMP");
into a variable, so that i can use it in my jsp code??


Thanks in Advance!
Akshay
Execute the statement and get the ResultSet. The most important thing is:
read the JDBC API documentation; it's all in there.

kind regards,

Jos
Jun 3 '08 #2
BigDaddyLH
1,216 Expert 1GB
A couple handy links:

Sun's J2SE tutorials: http://java.sun.com/docs/books/tutorial/
... including JDBC tutorial: http://java.sun.com/docs/books/tutorial/jdbc/index.html
Java documentation, including java.sql: http://java.sun.com/javase/6/docs/api/
Jun 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: F. Da Costa | last post by:
Hi, Does anybody know why IE5+ does *not* honour array objects (like a table) across a session? Example: Frame A contains a var tableVar which is set via form Frame B (on init) using...
12
by: harishg2 | last post by:
Hi, How to store a variable value for more than one executions. Ex: main() { int i=0; i++; printf("%d",i);
2
by: jmensch | last post by:
Hello. I'm a reasonably new ASP.NET programmer with no prior ASP or web development experience, but a lot of general programming experience. I'm using Visual Web Developer Beta Express 2005. ...
4
by: Rob | last post by:
Using VB.net and SQL server... I have a stored procedure that is simply returning a row count.... I know how to execute a stored procedure and add the output parameter. But how do I store...
2
by: hikmaz | last post by:
I am trying to get the rightmost digits (%10) of a number (taken from the user) and store it into successive array locations and get rid of the rightmost digit (\10) to store the next and so on and...
7
by: John Smith | last post by:
Hello, I have a simple question, I have a vb.net form with several buttons. If I store the name of a button in a variable.. Dim TheName as string TheName = ...
4
karthickbabu
by: karthickbabu | last post by:
Is Possible to store a value to declared Variable from Text Box at run time. I want to store a value from Text Box in 2 dimension array. First Value can be sotred in variable(0,0). If i press enter...
1
by: nsphelt | last post by:
Is there any way I can store a reference to a value type in a variable? Example: Public Class SomeClass Private valueRef As Integer Sub UpdateValue(ByRef value As...
2
by: rajeshjava | last post by:
I am working with xsl. i want to store a value in the variable. xml Source looks like the below one <?xml version="1.0" encoding="UTF-8" ?> <getTradingInstallmentHistoryResponse...
0
by: harshad | last post by:
Dear All,Here I am facing problem to store image.I am trying to store byte array(image) in to session variable so at time of update I will got that byte array and I do my update. here i am given...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.