Kevin McNally

Greenhorn
+ Follow
since Sep 24, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kevin McNally

I have an html site using a Javascript menu, and I want to call the javascript from a different folder so that any changes that need to be made to the menu only need to be done once.

I want to call it from a folder entitled "menu"
ok thx, i found were my problem really lies (other then the part you guys helped me fix). my aray is messed up..hmm Can u please tell me how to make an array and declare it so it can carry an infinite amount.. all i do is go
String names[]; but theres more right? plz show me =] thx
Ok i have this method to get names from a database so i can put them in a combo box later. Here is my code for the method:

public void getContacts(){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url = "jdbc dbc:email";

String userName="";
String PWD="";

con=DriverManager.getConnection(url, userName,PWD );
stat=con.createStatement();
rs=stat.executeQuery("SELECT * FROM contacts");
}
catch(Exception ev){
JOptionPane.showMessageDialog(null,""+ev.getMessage());
}//end catch
showRecord(rs);

}//end getContacts

public void showRecord(ResultSet result){
try{
do{

String iD,id2="";
iD=rs.getString(1);
if(iD==id2){
break;
}
names[i]=rs.getString(2);
id2=iD;
System.out.println(names[i]);
rs.next();
i=i++;
}while(i<=0);
}
catch(Exception eve){
JOptionPane.showMessageDialog(null,""+eve.getMessage());
}//end catch
}//end resultset

------------
Ok thats it.. now i know the database is fine and everything since i have connected to it before. The error i get when i try runing this is "Invalid cursor state" which i have no idea what that is.
So can i please get some urgent help on this?
I know the loop is pretty wierd lol , is there a better way? What i have is a database table with and ID for first coloumn and Firstname for second colom. I want it to add all the names in that table to a string variable names[] and then stop when its all done.. this is the only way i see it working but im sure there is a better way. Thanks alot.. and the sooner the help the better.!!!
do you know how to start the STMP Server for java?
20 years ago
Whats the easiest way to send email using java? This is isnt on the newest version of java beacuse im creating this program at school. Also, since we are working with multiple applets how in java do you change a web url. Say im at applet1.html and click button A. How do i make it so button a takes me to applet2.html in the browser? Ohh and 1 more thing =], I want to use a combo box..but as far as ive seen ive only seen JComboBox.. nothing to use just in non JApplets.. can they be mixed or is there another type of combobox that i can use for non JApplets?. Thanks.
20 years ago
So how do you do this step by step?
Say that i've made a database and saved it.
Now what do i do?
I know there are some lines of code to actually open the database in a java application yet are there more steps i have to go through before i can even open it? I tried using some code i got from a site yet had no luck.
So step by step what do I do?
1, I saved the databade
Whats next?
Some code would be helfull too =] Thx alot.