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
Solved

JSP..

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

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)
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 will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

840 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