Premkumar N

Greenhorn
+ Follow
since Apr 21, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Premkumar N

Priya:

You may want to use the following format in your bat file
start notepad.exe -this will start a process in a separate thread

Also: for testing purpose try giving commands like dir.
21 years ago
JSP
Hi Michael:
Thanks for further enlightening me regarding "Context Sensitive help".
Well though I ment the first scenario.. You've arroused my curiosity by listing the other options...
Would you please let me know about the "pattern-combination(s)" and some brief sumarry of "where to fit which pattern to make the combination effective" . I would be glad if you could let me know.. for option 1 and 2.
(I'm assuming that option-3 does not require any pattern)
Thanks for your help.
Cheers,
Prem
Hi Cindy:
Yea I would lookup Strategy for my "Context Sensitive help ..."
And.... thanks for your "empathy"
Cheers,
Prem
Hi All:
Would anyone please suggest a pattern that I could use in "context sensitive help"
Thanks,
Prem
There is one way ...
U can create a singleton class that stores the object to be shared in a hashtable..

..session-id being the key for the hashtable
Eg.. MySharedObject
Hashtable myHash
At Clinet Servlet:
MySharedObject.getMyObject("12312312") // hash key
or
MySharedObject.putMyObject("12312312", obj)
// getMyObject would return the object that is stored in the hash corresp to the current session-id.

Btw why do u want to do such a thing in the first place.. ?? it seems u are heading for a design-flaw !!
Thanks,
Premkumar
22 years ago
Btw ... regarding cPool... why aren't u using java's connectionpool ?

Cheers,
Premkumar
22 years ago
What i ment is:
If the control goes say 3 times in while(rs1.next()) ...

Then you are trying to use the same st2 (object-instance) to return another result set .. which voilates the rules spefied in javadoc
Any questions let me know ..
HTH
Prem
Arun :
I remember runnig into the same problem, and solving the same...

I hope I still remember the soln

Try the following:
bring the st2 initialization statement inside the loop it would work!
I mean the following line to inside the while loop, and just before calling st2.executeQuery.

The javadoc clearly states that one-instance-of-statement-can-be-used-only-once
=====================
"Only one ResultSet object per Statement object can be open at any point in time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All statement execute methods implicitly close a statment's current ResultSet object if an open one exists.
=====================
"
Statement st2 = conn.createStatement();

Please let me know if this was helpful and worked.
I guess u need to provide more details ..

IS your procedure returns a scalar return value or a string?
Then result-set does not have any meaning.

IF it returns a CURSOR then resultset would return the appropriate TYPE of the CURSOR and the COLUMN_NAMES etc etc..
HTH
Thanks,
Prem
Well the option that you have to take depends on the following factors

Does the data about locations .. change
frequently ? if so you have to go for
"querying the db at runtime"
IF NOT
Go for storing the values within the application.

HOW TO AVOID SEARCHING ?!
Well .. u can use a combo of HashTabele with some sort of identifiable-primary-keys.. and the values as vectors ..
Say
Country_ID country_name
Person_ID & Person_name
etc ...

GUI Logic ??
I guess u need to rework your GUI-showup-logic.. since the following statement doesn't sould like a thought-out-GUI-design
<< For unknown reasons I want to visit exactly four of my friends, so I need these 4 boxes four times [in total: 16 JComboBoxes >>
HTH
Thanks
Prem
This error appeared for me when the database exceeds the min-num of connections.
May be you are making new connections and not releasing/closing it properly.. or you are trying to open&close&open ... in immediate succession..
in such cases .... Oracle has some "latency" in destroying the connections [it is marked inactive].. though Java releases the connection ...
Hope you are using connection-pooling ...
Well .. if I understand properly...
You have the studentID in screen-1 (in some variable.)

Soln : While "instantiationg" or "before showing" screen-2 why not set that screen with thsi variable...
May be u could pass this ID as a param in constructor .. or you could say scr2.setTitle("StudentID")
Hoep this helps .. :roll:
As Jamie said. I feel that your JDBC driver is not supporting "SCROLL_SENSITIVE" ...
The option that I used in this scenario is .
Step1 : put the primary-key and the image name in a hash table
Step2: populate whatever GUI component you want with this list of names.
Step 3 : When u need to query the image form DB pass the stored "primary-key-id" to the DB and get the image.
Hope this helps rolleyes:
Thanks,
Prem :
Holding the data in a Vector or holding a ResultSet has Memory and Process overhead also confusion-overhead!! :-)
One suggestion. Have a session or Hidden-form-variable that will store the range-or-id of the last value ...
Use it in the WHERE clause while querying the next time
(e.g) say the last value currently in the hidden-variable is "40"
then the next time when u query it will be ..
SELECT .. FROM .. WHERE X >40 AND X <= 60
----
Premkumar N (Bioinformatics Programmer)
Monsanto, India.
<PRE>
Hi Ranch :
I have to fetch MyTemplateFile.htmlpresent in com.xyz.abc directory.
I want to access this file from the classcom.xyz.abc.MyClass

How can I compute the absolute-path of this file in the machine where the class-file(servlet) is located/loaded ?
[I know that we can use ResourceBundle ... and have a .propertiesextension to fetch as properties .. for that I need to put "\" at the end of every line in the html page]



I am not looking for a suggestion to go for JSP /ASP ...

</pre>
23 years ago