Solved

JSP..

Posted on 2001-06-05
2
205 Views
Last Modified: 2010-03-31
Hello,

 Can someone give me an example/codes of using jsp where
 you it grabs/delete/store data into MS ACCESS database?

TQVM
W.
 
0
Comment
Question by:wzm
2 Comments
 

Accepted Solution

by:
tarek_adel earned 70 total points
ID: 6159455
<%
Class.forName()
// writting the query
String szQuery = "select * from table";
String szDatabaseName ="mydatabase";
String szUserName ="tarek";
String szPassword = "sekoseko";

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc:odbc:"+szDatabaseName,szUserName,szPassword);

PreparedStatement pstatement = connection.prepareStatement(szQuery);

ResultSet results = pstatement.executeQuery();

while(results.next())
{

//get the data here
}

%>
0
 
LVL 3

Expert Comment

by:modder
ID: 6409648
wzm,

Don't forget to grade the proposed answer.

Even if it did not work for you, let us know. Reject the proposed answer, for starters. Then, since this question is a couple of months old now, I suggest you ask me to refund your points. Just let me know what you'd like to do. Don't just abandon a question.

modder
Community Support
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xampp tool 12 58
null output 3 42
jmeter usage 4 31
Hibernate Inheritance Strategy for Abstract Base class and two concrete classes 3 16
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question