Raj Chila

Ranch Hand
+ Follow
since Mar 18, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Raj Chila

Agree with Ulf Dittmer, there could be a lot of reasons why you see that error...but just by looking at your code snippet, Should'nt you be using a Prepared Statement? and if you are not, then the ?'s should be replaced with actual values and the value key word needs to be values.
11 years ago
Suggest also to use properties and refer to this in your code so that it can be easily configured for different environments.
11 years ago
JSP
Tomcat has the implementation to serialize the sessions in its work folder (I dont remember if it was during a browser close or a Tomcat shutdown). That could give you a good understanding in implementing your own.

But IMHO, this may pose security issues... Specially in a production grade application.
11 years ago
I Hope its not because of the typo
13 years ago
jsp
try to explore it yourself....if you are using tomcat the generated servlet will be in the work folder...
13 years ago
JSP

Prabhat Ranjan wrote:how to check it ?

i am getting the same error while re-installing again !



I did not use Windows 7 but you can go to the User management link in the control panel and it will show your status.

But otherwise, if you are using the db for short periods of time then I suggest to use the zip version of the applicaton and you could run the db when ever you want...or better still get XAMPP, it comes with mysql bundled and a good system tray icon to manage the MySQL and other applications it bundles.
Check if the service was installed in the first place (could happen if you diid not install it as an Admin)
executeUpdate returns an int suggesting how many rows are updated... loggin that to your output might help.

Also, it might help if you validate and trim your text before setting them on the statement.
Good to know it worked!

But still I am curious to know how your javap command loaded the MySQL Driver if your classpath was not set at all? and also how you were able to invoke DbConnect class without the package prefix and this class gets executed?

It is really strange! and it should not happen...

One thing I find fishy from your post is while your DBConnect class is packaged (net.sf.karproject.DogDb), your invocation looks is java DbConnect (without the package prefix and that is not possible)...Can that hold any clues?

Infact it looks like this is a Duplicate class, that is in the Classpath somewhere... this reiterates Peters comment about having a default CLASSPATH.

Breaking the application into modules and using swc files can help to certain extent.
15 years ago
It might be pertinent to add here that our Product development team develops Prototypes in Traditional HTML / css, we simply import these css into our development and they work right out of the box.

In almost about 2 years, we never had any incompatibilities.

may be css styles are a subset of what attributes we can set for the flex components. A good move by Adobe.
15 years ago
First of all use JSP's instead of out.println.

Try taking the db query logic part out of the main while loop
It would be too easy for us to actually give you the right code in the first place, but thats not the approach of this forum. We try to point you to the right direction so that you can figure it out yourself...more so when you are a beginner in Java.

I would suggest you to experiment with the tips given here...

ArrayList or List is the right approach here as Jeanne Boyarsky suggested in the earlier post.

Now that you know how to change the method signature...figure out what changes you need to make to return that type...either a java.util.List of the String[]...


Q cannot be resolved because it is not 'visible' from where you are returning it...declare it outside the loop and you will be good.

Also, Your code as it exists will not work as your expect...

try either change the method signature to return an String[] or use a StringBuffer to add all the results in the loop and at the end return the toString()

And also move the statement.close() too