JDBC, Servlets, JSP, and Beans need some help

Kushan

Active member
Veteran
Joined
Jun 13, 2008
Messages
2,322
Kin
0💸
Kumi
0💴
Trait Points
0⚔️
Hi Guys and Gals, I was wondering if there's anyone out there with experience and knowledge of web base Java programming, I'm currently involved in a project for Uni, and I need some help with it.

Basically what it is, is a simple message forum which enables you to login, view a list of messages, view details of a selected message and then obviously post a message, the data is, stored in a MS Access database, which is where majority of my problems steam from.

Issues:

When using multiple tables to retrieve data, can I use one ArrayList for conjoining all fields in that particular query??

Lets start with this, but there's more....
 

~Tahir~

Active member
Regular
Joined
Oct 7, 2009
Messages
1,456
Kin
0💸
Kumi
0💴
Trait Points
0⚔️
i'm not that good with java programming...learned only the basics of it....but i'm good with the HTML coding of web pages....so if u need any help with HTML i'll be glad to help
 

JG2480

Member
Joined
May 18, 2010
Messages
239
Kin
0💸
Kumi
0💴
Trait Points
0⚔️
I'm hardly what i call a webdev expert, more likely the opposite.

For starters i'm afraid i might not fully understand the question. But if it means what i think it means you have to query them conjoined.

PK = primary key

Like:

SELECT table1.field1, table1.field2, table2.field1, table2.field2 FROM table1 LEFT OUTER JOIN table2 ON table1.PK = table2.PK

This would allow you to values conjoin from both table1 and table2 to insert into an arraylist.

Something else you might need is table1.field1 + ' ' table2.field1 AS Confield1 this would give value of:
table1.field1 = 'hello'
table2.field1 = 'Narutobase'
Result = 'Hello Narutobase'

But i have no idea if this is what you are looking for.
 

Kushan

Active member
Veteran
Joined
Jun 13, 2008
Messages
2,322
Kin
0💸
Kumi
0💴
Trait Points
0⚔️
I'm hardly what i call a webdev expert, more likely the opposite.

For starters i'm afraid i might not fully understand the question. But if it means what i think it means you have to query them conjoined.

PK = primary key

Like:

SELECT table1.field1, table1.field2, table2.field1, table2.field2 FROM table1 LEFT OUTER JOIN table2 ON table1.PK = table2.PK

This would allow you to values conjoin from both table1 and table2 to insert into an arraylist.

Something else you might need is table1.field1 + ' ' table2.field1 AS Confield1 this would give value of:
table1.field1 = 'hello'
table2.field1 = 'Narutobase'
Result = 'Hello Narutobase'

But i have no idea if this is what you are looking for.
Hey mate; thanks for the reply, well I've got the query figured out, see the problem is where you collect the results of the query, normally this is done in a ResultSet object, while in to an ArrayList, my question is do we use 2 ArrayList separately for the 2 table or one for the results from that query, I'll edit this post with the code I have so you can get a better idea of what I'm on about
 

JG2480

Member
Joined
May 18, 2010
Messages
239
Kin
0💸
Kumi
0💴
Trait Points
0⚔️
Hey mate; thanks for the reply, well I've got the query figured out, see the problem is where you collect the results of the query, normally this is done in a ResultSet object, while in to an ArrayList, my question is do we use 2 ArrayList separately for the 2 table or one for the results from that query, I'll edit this post with the code I have so you can get a better idea of what I'm on about
I would just use 1. I guess in some cases you could devide it up for better performance. But it's hard to say without knowing what it's about.

Some source code could be very usefull.
 
Top