Frank Wang

Greenhorn
+ Follow
since Aug 18, 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 Frank Wang

Hello, everyone,
I need to make a slide menu, which is similar to drop down menu.
The JavaScript I used only works in IE, how can fix it in Netscape?
The coding goese here:
<BLOCKQUOTE><font size="3" face="Verdana, Arial">code:
<HR><pre>
<BR><html>
<BR><head>
<BR><title>Slide Menu</title>
<BR><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<BR><script language="JavaScript" type="Text/JavaScript">
<BR> <!--
<BR> function pullMenu(menu) {
<BR> if (document.all) {
<BR> thisMenu = eval("document.all." + menu + ".style");
<BR> if (thisMenu.display == "block") {
<BR> thisMenu.display = "none";
<BR> }
<BR> else {
<BR> thisMenu.display = "block";
<BR> }
<BR> return false;
<BR> }
<BR> else {return ture;}
<BR> }
<BR> //-->
<BR></script>
<BR>
<BR><style type="Text/CSS">
<BR> #menu {display:none; margin-left:20px}
<BR></style>
<BR></head>
<BR>
<BR><body bgcolor="#fffffff">
<BR> <h1 align="center">Sliding Menu</h1>
<BR> <table width="20%">
<BR> <tr><td>
<BR> <A onMouseover="return pullMenu('menu1')">
<BR> <b><font color="white">Home</font></b>
<BR> </A>
<BR> <Span Id="menu1">
<BR> <A href="aboutus.html">About Us</A><br>
<BR> <A href="sitemap.html">Site Map</A><br>
<BR> <A href="contact.html">Contact Us</A><br>
<BR> </Span>
<BR> </td>
<BR> </tr>
<BR> </table>
<BR></body>
<BR></html>
</font></pre><HR></BLOCKQUOTE>
Thanks a lot in advance.
Frank
I recently have a need to know idq file. Would someone do me a favor to explain it or send an e-mail to qpwang86@yahoo.com?
Best Regards!
Frank
Hi, Amit, you may try Http://java.sun.com/products/jdbc, you can find what you need. The latest version of JDBC is beta 3.0.
Frank W.
The trick is you need to specify the name "testdb" (which needs be designated in the connection URL) in ODBC data source manager, while the database you have created in Access (for example, the testdb.mdb in Access 97 in your hard drive) is required to be selected there.
The connection code:
Connection con = DriverManager.getConnection ("jdbc dbc:testdb", "", "");
should be right.
Have fun.
Frank W.

Hi, Sri, I am not quite sure how big your image files are.
My experience is to save the image names in Oracle and the actual image files separately. Although you can save image files in Oracle DB, you can have problem when an image file is too large.
Frank W.
Hi, Ryan, maybe you have got it already.
Just like Paul Sun's answer to my question, maybe you need to specify the data source name in the url in your coding properly.
When you load the bridge from JDK, you needn't do anything more with other package. And the driver is in the Access which provides it originally.
Frank W.
Thank you very much, Paul and Ryan. I made the program go just as following your guides.
Best wishes and warmest greetings to you, Thomas and all the other guys in the new year.
Frank W.
Thank you, Thomas.
I followed your instruction to try to set up the odbc data source manager, but I didn't make the program done. I know the problem is that I don't know how set it up properly. Should I set up the User DSN or the System DSN, since I have added the driver there already. No matter I set the User DSN or the System DSN with the Access Driver, I still get the same exception.
Looks like a stupid question. But I really need some hints to get the program go.
Kindly thank you, Thomas and other guys.
Frank W.
Hi, Folks, I started to learn how to use JDBC recently. Now I got a difficulty to connect
my Access database. I have Access in my computer which runs NT. I know I need to use
JDBC.ODBC to get connection in the following coding. But when I execute the class, I get
an exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified.

What should I do? Is the classpath or the ODBC Data Source Manager in the Control Panel?
And how to do it?
Thank you very much. I really appreciate your help.
Frank
import java.sql.*;
public class Example1 {
��
public static void main (String args[]) {
����
try {
������
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
����
}
����
catch (Exception e) {
������
System.out.println("JDBC-ODBC driver failed to load.");
������
return;
����
}
����

try {
������
Connection conn = DriverManager.getConnection("jdbc:odbc:inventory","","");
������
Statement stmt = conn.createStatement();
������
ResultSet rs = stmt.executeQuery("SELECT * FROM inventory ORDER BY price");
������
ResultSetMetaData rsmd = rs.getMetaData();
������
int numberOfColumns = rsmd.getColumnCount();
������
int rowCount = 1;
������
while (rs.next()) {
��������
for (int i=1; i<=numberOfColumns; i++) {
����������
System.out.println(rs.getString(i) + " ");
��������
}
��������
System.out.println("");
��������
rowCount++;
������
}
������
stmt.close();
����
}
����
catch (Exception e) {
������
System.out.println(e);
����
}
��
}
}

[This message has been edited by Thomas Paul (edited January 04, 2001).]
Hi, Aruna, no, the only answer is C.
Answer b(A class must define all the methods in the interface that it says it implements) is wrong because a class does not implement all the methods in an interface. In this case this class is an abstract class, must be declared as abastract.
With regards!
Frank
Hi, Han Meng and Ajith, Thanks very much.
For answering an Meng's posting, more than to reply you personally, I'd like to post this message here, hope it will help you, as well as the other guys.
If you want to get prepared within 15 days, I think it's a big task. But actually I have just been here for one week. This is a very good place to get what you want, especiall when you have questions. Most of the guys are very good at answering all kinds of difficult ones. My suggestions are:
1. Do spend one or two hours to browse through all the questions and answers other people have and post. Maybe you don't have them right now, but it looks like you can meet in the exam.
2. Check the helpful links and get the detailed guides and main points and ideas from other people. Do try this one: www.javaprepare.com/links.html.
3. Test yourself with the mock exams, for example, Marcus Green's three mock exams. Take all the notes when you think necessary. If you have doubt, try it on your computer to figure out. If you can, post it here. I am sure you can get help the second when you do it.
Hope these tedious words can help you.
Best wishes!
Frank
Please tell me the how to prepare for the exam in coming 15 days.Plz mail me note and
tips to hanmeng1961@hotmail.com
Hi, friends, Thank all of you very much. Although I have just been in this saloon for only one week, you really helped me a lot and I learned so much.
I passed the exam with 85% today. I am so happy, becase for the past month I had concentrated too much on Java. Terms and coding character almost danced in my brain when I was my sleeping and waked me up. Now I can sleep well. Thank God.
For you guys, keep going, try to understand all the concepts and rules in detail. This can help you no matter what kind of questions you can meet in the test.
Best luck to you all.
Regards!
Frank
Hi, guys, first thank all of you very much, especially Usha. I am quite clear now. Second there surely is a mistake in answer (a), t.start; should have been t.start();.
Best wishes to you all!
Frank
Hi, friends, I know whenever I have questions I can turn to you for help, because you are so good to be in this wonderful saloon.
Question 1:
Which expression will evaluate to ture if preceded by the follwing code? Select all valid answers:
<space type=horizontal size=18>String a = "hello";
<space type=horizontal size=18>String b = new String(a);
<space type=horizontal size=18>String c = a;
<space type=horizontal size=18>String char[] d = {'h', 'e', 'l', 'l', 'o'};
(a) (a == "hello")
(b) (a == b)
(c) (a == c)
(d) a.equals(b)
(e) a.equals(d)
The answer is (c) and (d). But my answer is (a), (c) and (d). I tried the code below and got true printed out. Would someone like to try it again? Thank you.
Public class Try{
<space type=horizontal size=18>public static void main (String argv[]){
<space type=horizontal size=36>String a = "hello";
<space type=horizontal size=36>boolean b = a == "hello";
<space type=horizontal size=36>System.out.println(b);
<space type=horizontal size=18>}
}

Question 2:
Give that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work? Select all valid answers.
(a)
Runnable r = new Runnable(){
<space type=horizontal size=18>public void run(){
<space type=horizontal size=36>Work.doIt();
<space type=horizontal size=18>}
};
Thread t = new Thread(r);
t.start;
(b)
Thread t = new Thread();
<space type=horizontal size=18>public void start(){
<space type=horizontal size=36>Work.doIt();
<space type=horizontal size=18>}
};
t.start();
(c)
Runnable r = new Runnable(){
<space type=horizontal size=18>public void run(){
<space type=horizontal size=36>Work.doIt();
<space type=horizontal size=18>}
};
r.start();
(d)
Thread t = new Thread(new Work());
t.start();
(e)
Runnable r = new Runnable(){
<space type=horizontal size=18>public void run(){
<space type=horizontal size=36>Work.doIt();
<space type=horizontal size=18>}
};
r.run();
The answer is (a). But I think none is right. Since Runnable is interface and implicitly abstract, how can it be created an object here. Would you guys explain it?
Thanks a lot. With regards!
Frank
Sorry, it's a long, not a double.
Frank