View Full Version : How to retrieve data from database(MYSQL) in JSP

03-21-2008, 07:49 PM

I'm creating a Web Application for my Final Year Project i need ur help people im new to this.

Im using Netbeans. I have created Jsp pages n Im using MySql for Database.
I had problems with connecting to the Database now that is done.

Can anyone tell me how can i retrieve data from database using a search field. Like if i want a record of an employee whos id is "123" then i'l write 123 n click search and will get the record of employee whos id is "123".

What code should i write to get this data and where should i write it for retrieving the data?

If possible please write the whole code...i.e. from start to end..with connection.

Reply Soon.

Thanks in advance.

03-22-2008, 04:03 AM

Hate to break it to ya:

1.5) No homework assignments - Do not post your entire homework assignment and request that other members do it for you. This is considered cheating, and your thread may even be used by your school to prove your guilt. Now, you may ask for advice or help on a specific aspect of your assignment that you're having trouble with. Use common sense as far as what's acceptable in terms of soliciting help with homework assignments.

That being said, MySQL has a ton of documentation on how to connect to a database and run SQL statements.