This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie Question - how to use different table

 
Namnai Kidorkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used this tutorial in apache server

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

everything is working fine. but now, i want to play with it to understand it better. I created a different table and want to use it. I changed all the codes that seems to have a connection but still i get the error message

"Table 'javatest.users' doesn't exist"

obviously javatest was the old table which does not have users. the code is still using this javatest table.

where in the code do i select a different table? is it in server.xml web.xml or in the test.jsp code? which code? please help.
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The table is specified at the end of the connection string in server.xml:

<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>

Where javatest is the name of the table. Also, most servers will let you change the table you are accessing. In mySQL you can use the USING keyword, or put the database name in front of the table name.
 
Yilmaz Mete
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javatest seems to be the database name, rather than the table name.
 
Namnai Kidorkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kerry Wilson's answer was right on the money. thats what i was looking for but could not figure out.

thanks guys.

btw, i'm trying to learn all those things and currently playing with the mysql scripting (.sql files). is there a good tutorial/site you guys know where i can learn it? thanks in advanced.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic