yes you are right, discovered that that is the problem today. The
problem is tho that I am not using my own computer to program on, I am
using the university sun server, and the computer I am useing only has
JDBC 1.1 and JDK 1.2 for tomcat. Does any one know who to solve my
problem using these out dated methods?
Thanks Dan
>>Thankyou, that has been useful, only think is I can't get it to work!
>>my code works fine with
[quoted text clipped - 27 lines]
> David Harper
> Cambridge, England
David Harper - 21 Apr 2004 20:28 GMT
> The problem is tho that I am not using my own computer to program on,
> I am using the university sun server, and the computer I am useing
> only has JDBC 1.1 and JDK 1.2 for tomcat. Does any one know who to
> solve my problem using these out dated methods?
[SNIP]
You should be able to download JDK 1.4 from the Sun Java web site and
install it locally e.g. in your home directory, without the need for
superuser privileges. I've installed Java in this way on several Unix
platforms when I needed to use a more recent version than the one that
my sysadmin had installed centrally.
Then all you need to do is adjust your PATH environment variable by
prepending the location of the JDK 1.4 binary directory, and you're up
and running with Java 1.4.
That automatically gives you JDBC 3 capabilities, provided that your
JDBC driver supports them.
Hope this helps.
David Harper
Cambridge, England
Dan - 21 Apr 2004 21:33 GMT
Thats the funny thing, because I have put my own mysql JDBC driver in my
classes directory, and JDK 1.4 is installed, so normal java programs run
fine. But as soon as I change the java file into a JSP page, which is
run under tomcat (which is using java 1.2), the page shows an error
basically saying that it doesn;t support the getGeneratedKeys() method.
Do I need to change the tomcat environment variables or something?
>> The problem is tho that I am not using my own computer to program on,
>> I am using the university sun server, and the computer I am useing
[quoted text clipped - 20 lines]
> David Harper
> Cambridge, England
David Harper - 22 Apr 2004 08:37 GMT
> Thats the funny thing, because I have put my own mysql JDBC driver in my
> classes directory, and JDK 1.4 is installed, so normal java programs run
[quoted text clipped - 3 lines]
>
> Do I need to change the tomcat environment variables or something?
Yes, you do.
You need to set JAVA_HOME to point to the location of the Java
installation that you wish to use.
It's defined in the startup shell script in your Tomcat distribution, so
you have to edit the startup script to set the correct value of
JAVA_HOME, then re-start your Tomcat server.
David Harper
Cambridge, England
Sergey Stepanenko - 21 Apr 2004 23:07 GMT
> yes you are right, discovered that that is the problem today. The
> problem is tho that I am not using my own computer to program on, I am
> using the university sun server, and the computer I am useing only has
> JDBC 1.1 and JDK 1.2 for tomcat. Does any one know who to solve my
> problem using these out dated methods?
You may use MySQL-specific query to get value of the autoincrement field:
SELECT LAST_INSERT_ID()
--
Dan - 22 Apr 2004 15:15 GMT
Thank you every one, decided to go with SELECT LAST_INSERT_ID() since it
would mean less fiddling witht he server.
Cheers for the help
Dan
>> yes you are right, discovered that that is the problem today. The
>> problem is tho that I am not using my own computer to program on, I am
[quoted text clipped - 4 lines]
> You may use MySQL-specific query to get value of the autoincrement field:
> SELECT LAST_INSERT_ID()