deepak mag

Greenhorn
+ Follow
since Oct 11, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by deepak mag

I think it's mostly related to brower security.
I feel instead of applet connecting to the database. Use get/post methods to post data to a servlet or bean which in turn will connect to the database.
Good luck
DM
Here I set the properties and load the vector
aud is an Object
vt_aud is the vector
while(rs.next())
{
aud.setFirstName(rs.getString(1));
aud.setLastName(rs.getString(2));
aud.setEmail(rs.getString(3));
vt_aud.add((Object)aud);
}
To retrive
for(int i=0;i<vt_aud.size();i++)>
{
aud = (audience)vt_aud.elementAt(i);

firstname = aud.getFirstName();
lastname = aud.getLastName();
email = aud.getEmail();
System.out.prinln(firstname);
}
The problem is it prints only the last record of the resultSet.
Thanks for help.
DM

Originally posted by Ambrose Tati:
I am trying to do some database access from within Java. Can anybody please tell me where to download the jdbc driver I need?
My environment is:
JDK1.3
Windows98
Personal Oracle7
Is there an Personal Oracle7 jdbc driver for Win98?
Many thanks in advance.
Ambrose



Hi,
You don't need any drivers. You can use normal JDBC connection to establish the link.
Follow the folling steps
1. Create a DSN (my_DSN) on your machine.
2. Use this code to create connection
dbCon = DriverManager.getConnection("jdbc dbc:my_DSN", "username", "pass");
3. Use "sun.jdbc.odbc.JdbcOdbcDriver"
It work for me. I have been using it from quite some time.
Good luck
DM
Hi,
I am looping through a ResultSet to set properties of an Class(cl). Then I add each class to the vector(vt) by casting the cl into Object. But when I try to retrieve elements from the vector. I only get one element as though all the elements in the vector are occupied by only one element.
Tell me how to retain the values(Objects) in the vector?