Solved

JSP..

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing to a specific printer tray (HP 806dn printer) 3 85
varialbe initialization 11 30
MySQL  on Tomcat 8 31
How to convert String matching to regex in java 4 21
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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.

863 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

18 Experts available now in Live!

Get 1:1 Help Now