Solved

JSP..

Posted on 2001-06-05
2
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

751 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