wood burning stoves 2.0*
The moose likes JDBC and the fly likes help please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "help please" Watch "help please" New topic
Author

help please

Didier McGillis
Greenhorn

Joined: Mar 06, 2002
Posts: 27
package ...
import com.project.Global;
import com.wp.tier1.*;
import com.wp.util.*;
import java.sql.*;

public class DealerList implements java.io.Serializable {

public String ListOfDealer;

public DealerList() {}

public String getDealers() throws DataLayerException
{
Connection Connection = null;
Connection = ConnectionFactory.getConnection();
synchronized(Connection)
{
try
{
Statement Statement = Connection.createStatement();
ResultSet rs = Statement.executeQuery("SELECT customernumber, company, name, shipcity, shipstate FROM dealer WHERE authorized=20 order by company");
String city="";
while (rs.next())
{
if(rs.getString(4) != null){city = rs.getString(4);}
ListOfDealer = ListOfDealer + "<option value=" + rs.getString(1) + ">"+ rs.getString(2) +","+ rs.getString(3) +","+ city +","+ rs.getString(5) + "</option>";
}
if (rs !=null) rs.close();
}
catch (Exception e)
{
e.printStackTrace();
}
}
return ListOfDealer;
}
public String getDealerList() {
return ListOfDealer;
}
}
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Um, thanks for the code.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
You have not posted a question, so how can anyone answer?


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
How can we help you if we dont know what your problem is?

daniel
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Come on, any one guess the question yet?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No, but the answer is probably 42.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
It won't compile.


Mani
Quaerendo Invenietis
Eric Zanders
Greenhorn

Joined: Sep 15, 2004
Posts: 16
That's because you're missing a piece, Mani.
It works fine with me...
Eric Zanders
Greenhorn

Joined: Sep 15, 2004
Posts: 16
The actual question is: who's dealin' and which cardgame is this anyway?
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
OK, "why don't this code compile?" is a feasible question. Any others?
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Originally posted by Eric Zanders:
It works fine with me...



Even with such a package statement, it works fine for you!
I think you are not using a Java compiler
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60780
    
  65

OK you guys, stop picking on Didier... that's MY job!

Seriously Didier, as you can see, posting a boatload of unformatted code without any explanation isn't the most effective way to ask a question. Please use UBB code tags to preserve the formatting of your code, and please include a well-worded question.

If you aren't going to take time and care to ask a good question, why should anyone take the time to answer?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Wright
Ranch Hand

Joined: Oct 05, 2004
Posts: 42
Well hes got a few replies already without one...... so imagine the response if he did ask a question.
You may have bandwidth problems if and when he does.

As for the good question theory...... ive only ever asked stupid ones and always got replies. I think people feel sorry for me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help please
 
Similar Threads
Error with jsp and JavaBeans
Retrieving values using option buttons.. please help!!
JSP et Bean JasperException
help with application variables to store the list of names code
Returning a 0 value error