Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help please

 
Didier McGillis
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um, thanks for the code.
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have not posted a question, so how can anyone answer?
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we help you if we dont know what your problem is?

daniel
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Come on, any one guess the question yet?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, but the answer is probably 42.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It won't compile.
 
Eric Zanders
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because you're missing a piece, Mani.
It works fine with me...
 
Eric Zanders
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The actual question is: who's dealin' and which cardgame is this anyway?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, "why don't this code compile?" is a feasible question. Any others?
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Wright
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic