Frances Fang

Greenhorn
+ Follow
since Dec 01, 2000
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 Frances Fang

Hi,all,
Does anyone know how to passpord protect my web page?Tks!
Frances
Hi,all,
I figured it out.
Thank you anyway for reading my post.

Frances
Hi,all,
I want to use telnet to connect to my local machine so that I can run my server program locally.I am using DSL to access internet.I tried the host name "localhost" and port "8189",also tried host name "127.0.0.1" and port "8189".But the connection could not be made. Anybody know how?
Tks in advance!
Frances
Hi,Asha,
Thank you for yr help!
I tried your method,tried to put string of SQL stmt in single quote.But I failed at even the 1st round:-- invalid argument value. So I figure that it should not be in single quote.
I am thinking,why setString(index,string) of PreparedStatement can be ok at the 1st round but failed thereafter? Am I missing something here?
Frances
23 years ago
Hi,
I am working on a project talking to database.But I encounted a problem.
if (XXXQueryStmt==null){
String XXXQuery="SELECT * FROM "+tablename+
"WHERE "+tablename+".columnName=?"; XXXQueryStmt=con.prepareStatement
(XXXQuery);
}

XXXQueryStmt.setString(1,comboBoxItem);//err
rs=XXXQueryStmt.executeQuery();
//... some other codes
private PreparedStatement XXXQueryStmt;
private ResultSet rs;
private String tablename;//It is the tablaname in the database
//comboBoxItem is String type,which is assigned through comboBox.getSelectedItem();
the 1st round: I clicked one item in JComboBox,it shows the string of rs which is type of ResultSet.That's good.
the 2nd round & thereafter: There's a exception stating: invalid handle.I debugged, it is at XXXQueryStmt.setString(1,comboBoxItem);
Why? Anybody can help? Tks!
Frances

23 years ago
Hi,Manfred,
I finally set a boolean flag to control it. But your ev.getValueIsAdjusting() is a better,neat idea. I tried and succeeded. Thank you very much!
Frances
23 years ago
Hi, Pat Patal,
I just got back from out-of-town.Sorry I am late and thank you for your help! I am working on it now.

Frances
23 years ago
Hi,all,
I am using a JList and add a ListSelectionListener.But every time I click the item in the JList once,it fires two ListSelectionEvent because the valueChanged() is invoked twice.Anybody know how to fix this?
Thank you in advance and May you have a merry Christmas!
Frances
23 years ago
Hi,Mark,
I sent you an email.Did you receive it? Tks!
Frances
23 years ago
Hi,all,
I need your suggestions to make my decision.
I am a BS of Computer Science & Engineering and a SCJP.But I don't have very strong IT working experience.Most of my working experience is non-IT.But then I decided to switch back to IT.So last year I learned C++ on my own.Finally,I seriously want to be a Java Developer,so I started to learn Java beginning of this September and got certified three months later.Now I am learning JDBC,RMI,etc.I did some projects using C++ and Java for my current company.But the projects are not big in view of a professional.
I already started to look for a Java job,got some phone calls from recruiters,that's it.I feel they don't care SCJP.They just ask "How long have you been doing Java?" "Do you do a lot of programming?" I am an entry-level,but I think I can catch up things quick.Now I am stuck in the "chicken or egg,which one comes first" loop.
There are some TRAIN-to-HIRE companies.I wonder if I should surrender to them?Some of them guarantee the job with one year contract and very low salary.Is it worth it? Does a person like me have a chance in New Jersey or New York City?
I'd like to hear suggestions from you guys.Tks!
Frances
23 years ago
Hi,
Thank you for your help!
I did what you & "readme.html" suggested:
1) In autoexec.bat:-
...
PATH %JAVA_HOME%c:\jdk\bin
set CLASSPATH=.;c:\jdk\lib\tools.jar;c:\jswdk-1.0.1
\webserver.jar;c:\jswdk-1.0.1\lib\servlet.jar;
%CLASSPATH%
2) Change the "Initail Memory" of MS-DOS to 2816.
But the problem still exists. Why? Am I missing something here?
Frances
23 years ago
Hi,
I downloaded and installed jswdk-1.0 from http://java.sun.com/products/servlet/index.html to my Windows 98 computer.I also set Servlet.jar & Webserver.jar on classpath.But when I double-clicked the startserver.bat file,the message says
"out of environment space
out of environment space
// a couple of this message
using CLASSPATH;
"
What does this mean? How to fix it?
Tks!
Frances
23 years ago
Hi,
I am using PointBase database.But DriverManager.getConnection(String url,String username,String password) alreays throws SQLException stating that "no suitable drivers" at run time. I put all the property info in a properties file and this file will be read and passed to getConnection() of DriverManager.The driver I used is "com.pointbase.jdbc.jdbcDriver".Why is there this exception? Please help!
Tks!
Frances
Hi,
Forget about the title of this question. I have more detailed info about it. I debugged and found out where the problem is but I don't know why.
The code caused the problem is as follows, this is a method which will be called in main(),the main() handled exceptions:-
public static Connection getConnection()
throws SQLException, IOException
{ Properties props = new Properties();
String fileName = "MakeDB.properties";
FileInputStream in = new FileInputStream(fileName);
props.load(in);
String drivers = props.getProperty("jdbc.drivers");
if (drivers != null)
System.setProperty("jdbc.drivers", drivers);
String url = props.getProperty("jdbc.url");
String username = props.getProperty("jdbc.username");
String password = props.getProperty("jdbc.password");
return
DriverManager.getConnection(url, username, password);
}

The SQLException was thrown by DriverManager.getConnection(url,username,password),the error messages are as follows:-
the SQLState is :08001;
the error message is :no suitable driver
the vendor-specific info is: 0
In the corresponding proprieties file,it is:--
jdbc.drivers=com.pointbase.jdbc.jdbcDriver
jdbc.url=jdbc ointbase:corejava
jdbc.username=PUBLIC
jdbc.password=PUBLIC
I put the directory AA in classpath via
SET CLASSPATH=.;c:\AA
The pointbase is in c:\AA,the program and its properties file are in c:\AA\B\C. Is this a problem or am I missing something here? Please help!
Tks!
Frances