Greedy thomas

Ranch Hand
+ Follow
since May 15, 2003
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 Greedy thomas

Hi
I am getting "Provider org.apache.xerces.jaxp.SAXParserFactoryImpl could not be instantiated: java.lang.NullPointerException"
error in parsing.
can you please help me out.

thanks :
thomas
Hi
I am using DB2.I have checked the classpath and jars/zips needed.i think that is not the problem , otherwise it won't run for first time.
may be WSAD have some version problem with jdbc-odbc bridge.please correct me if i am wrong.

thanks & regards,
Red Bottle
16 years ago
Hi All
I am using WSAD 5.0.1 version , while connecting to dataBase i am getting error "No suitable Driver".where as if I run program first time it runs properly.
my point is :
- Driver is correct.
- No problem in code otherwise it does not run first time.
again if I restart the WSAD i got the result very first time.
Any Idea about the problem???

T & R
- Greedy thomas
16 years ago
Hello All

I've been asked to model a design of a chess game. I have written out flowchart for the showing out the procedure flow using rectangles and ellipses. My question is : Is this considered non-OO to design using a flowchart. I've tried using Use Case Diagram but the only thing I can put there is two actors on either side with both interacting with a 'Move Piece' oval between them.

If flowcharting is not considered OO, then could someone please explain why.

What would be the best method to design the above.


Thanks In Advance.
Hello All

I've been asked to model a design of a chess game. I have written out flowchart for the showing out the procedure flow using rectangles and ellipses. My question is : Is this considered non-OO to design using a flowchart. I've tried using Use Case Diagram but the only thing I can put there is two actors on either side with both interacting with a 'Move Piece' oval between them.

If flowcharting is not considered OO, then could someone please explain why.

What would be the best method to design the above.


Thanks In Advance.
17 years ago
Hello All

I hope this is the correct forum to post this. The following question was given to me and I'm not very sure as to how to answer it. The question states :

Model the functioning of a chess game.

The design should focus on the major components of the game namely, the board, chess pieces, how the would move. The output is a set of models/diagrams that should show how you arrived at a particular solution. The process you use must be clearly stated. You can document your design in any notation or methodology.

How should I go about this.

Any ideas/help would be of great assistance.

Thanks.
17 years ago
Hello

I hope this is the right forum to post this question.

How do you display a list of items in a scroll pane after you read them from a database.

e.g. Suppose you have a list of people in a database table called People. The columns are First Name, Middle Name, Last Name, Gender and Date of Birth. I can read the entries from the database into the resultset. But what do I use to display it on the screen.

Suppose I have a business object called People with the fields described above and I create an array of People to hold these values. How can I populate the values of the array from the resultset. Do I have to parse the result and map each value to the appropriate field of a People object and append this object to peopleArray object.

Also what do I use to display this on the screen. I want to have a scrollable list that displays all the People row-wise with column heading for the individual fields.

I suppose there's an easy way to do this but I can't work it out at the moment.

Please help as I am fairly new to this and seem to be running around in circles.

Thanks,
R
17 years ago
Thanks Masoud

I've tried what you had suggest but still seem to be running into problems. Please help guys.

The JDBC directory exists in C:\ORACLE\ORA90. Within the LIB directory I have classes111.jar and classes12.jar.

I have the following in my autoexec.bat file :
SET path="C:\Program Files\Oracle\jre\1.1.8\bin";"%path%";
SET Path=c:\oracle\ora90\bin;"%Path%"

My computer name (from Start -> Settings -> Control Panel -> Network : Identification Tab - Computer Name Field = Computer)

My database name (SID) is rajesh.

Do I need to create any environment variables. I have Oracle 9.0.1 and am using Windows 98.

What do you mean by
>> put [oracle 9i2] %Oracle_home%\jdbc\lib\ojdbc14.jar in your class path
What is [oracle 9i2]? Does the class path you refer to mean the SET path I have above.

When I run the following code, it fails with 'Failed to load driver'



Also, when do you use "OCI" and when do you use "THIN".

Please help - I really need to get this going.

Thanks you for all your help.

Regards,
Rajesh
Thanks Julian

How do I find out what Oracle drivers has been included in my installation. Also, how do I find out the Oracle Data Source Name and what should I use.

Please excuse my ignorance but I'm new to this side of programming.

Thanks,
Rajesh
Hello

I'm having problems connecting to the databse via a java program. I'm using Win 98 and Oracle 9i Personal Edition. The database is on the same machine as the code. Accessing the data via SQL Plus works fine.

The database is mounted and ready. I tried using the following program but get the error listed below. Do I need to create a new datasource using Start -> Settings -> ODBC Data Sources or what is the datasource that has been provided with Oracle 9i.

Also in the url for the getConnection, do I use the sid value in here e.g my sid is Rajesh so do I use "jdbc dbc:Rajesh"

Please help.

Thanks in advance,
Rajesh





java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3028)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at TestConnect.main(TestConnect.java:12)
Hello

I am currently using Java 1.4 on Windows 98 and have installed Oracle 9i on my system. What do I need to do to be able to access the database. I understand that I would need to use the ODBC drivers. Do I use the one that was installed when I installed Oracle 9i on my system. How can I test if I can access the tables in the database.

I'm fairly new to Java and learning how to use JDBC now.

Thanks in advance
R
Thanks Craig for your reply.

I understand what you are saying but still not sure where to make the changes to my code. I suppose I must still try tinkering around with this one.

Regards,
Rajesh
17 years ago
Hello There

I'm having a problem understanding the scoping of variables.

This is my understanding - correct me if I'm wrong.

Static means that the variable/method can be accessed from anywhere within the class. I assume that this means that it can be accessed within the methods of the class and also within any other classes.

Public means that any other class can access the variable/method. Does this class have to be in the same .java file.

What is the default if no access modifier is specified. What is the scope of the variable/method of those declarations.

I've enclosed the following program. When I declare testArray as static, the program compiles and runs correctly. However, if I omit the static or declare testArray to be private, I get the following compilation error message :

testArray.java:14: cannot resolve symbol
symbol : variable length
location: class testArray
for (int i = 0; i < testArray.length; i++) {
^
testArray.java:15: non-static variable testArray cannot be referenced from a static context
if (testArray[i] == stockID) {
^

Can I not have it as private or leave out the access modifier and then write methods to manipulate it?

Also, why do I have to have the method checkStock to be static and/or public. Can I not leave these out. When I do leave these out, I get the following compilation error :

testArray.java:25: non-static method checkStock(java.lang.String) cannot be referenced from a static context
if (checkStock("Four")) {
^

I had wanted this array (testArray) to be private since it must only be known by this class. This is why I had tried to declare it as private initially but kept getting errors. I thought if I could declare the array as private, then I could declare the checkStock method as private as well, since the method will only be used in this class. How do I go about declaring a private member of a class and what signature must the methods that access these private members have.

I suppose I'm missing something very basic and important here but not able to fully figure it out. Do I always have to declare the variables as static to allow me to access then within methods.

Thanks in advance for your assistance.

Regards,
Rajesh


17 years ago
Thanks Ben for your reply.

I do have the steps that was listed in the thread you had kindly directly me to. However, my problem is not that I cannot draw graphics. That I can do. My problem is that once I have drawn the graphics and then bring up the menu, the area that the menu occupied on the graphics gets cleared. Also, if you minimize and then restore the window, the graphics is cleared.

Any other suggestions would be most welcome.

Regards,
Rajesh
17 years ago
Hi There

I'm writing a graphics program. The problem I'm having is that whenever the menu drops over the graphics area, it erases the lines that I have drawn. Also when I minimize and the restore the window, all the graphics is lost. Is there something I'm missing to preserve the lines I've drawn in the graphics area.

I've included the code below. Could someone please advise me as to what to do.

Thanks in advance,
Rajesh

17 years ago