Solved

JSP..

Posted on 2001-06-05
2
197 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now