The Artima Developer Community
Sponsored Link

Java Answers Forum
JSP Connect mysql problem

1 reply on 1 page. Most recent reply: Feb 22, 2003 11:11 AM by Ibrahim

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Mapping

Posts: 1
Nickname: plma
Registered: Feb, 2003

JSP Connect mysql problem Posted: Feb 21, 2003 12:18 PM
Reply to this message Reply
Advertisement
Hi,
I get a problem when I use jsp to connect my database mysql. at first I wanna to view the data by using statement "select * from case", however, it can find my table, but it can't return any data and column.
It only return some mess code to me.
Then, I use the statament to insert sth. It said that " Can not issue data manipulation statements with executeQuery()". What should I do?


Ibrahim

Posts: 1
Nickname: jp3003
Registered: Feb, 2003

Re: JSP Connect mysql problem Posted: Feb 22, 2003 11:11 AM
Reply to this message Reply
First ,

after you execute the SQL Query

you will get the data as ResultSet object

then to see the data you have to iterate throw

the ResultSet object you'v got
===================

for the Insert SQL Statement you have to use

the executeUpdate() method

go to this link i hope it will help u

http://developer.java.sun.com/developer/onlineTraining/Database/JDBCShortCourse/jdbc/jdbc.html#jdTalking

jp3003
Ibrahim3000@gawab.com

Flat View: This topic has 1 reply on 1 page
Topic: help with small program - pretty basic Previous Topic   Next Topic Topic: anyone can point out the mistakes?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use