Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

having a problem

 
Patrick Mallahan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure if this is the right place to post this but here we go. I am trying to pull info from an SQL database but getting an error:



the table exists though. And I am using Tomcat 5.0.28 and J2sdk 1.4.2_08. Thanks in advance.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are sure that table exist then check your connection..if you are connected to right database ...

Shailesh
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You Need to check few things here.

First try to run the same query in the database
If query runs fine check the connection details i.e username, password and connect string

Either one should work

Srilakshmi
 
Patrick Mallahan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am able to connect to other tables in that database, just cant pull that specific table. my username and pass are correct on it also
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you din't answer about Srilakshmi's suggestion that if you are able to run query on database or not.
might be you are able to do so just wanted to confirm ?

Shailesh
 
Patrick Mallahan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i run a query? with mysql query browser i can, I can see what all is in the DB
[ June 27, 2005: Message edited by: Patrick Mallahan ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Patrick Mallahan:
how do i run a query? with mysql query browser i can, I can see what all is in the DB

[ June 27, 2005: Message edited by: Patrick Mallahan ]


  • Copy the SQL from your application code
  • Connect to MySQL using whatever client application you normally use
  • Paste the SQL into this and run it.


  • If you are using MySQL Query Browser and you are unsure how to do the above, its all covered in the docs. Have a read - feel free to post questions if you don't understand
     
    Phillip Koebbe
    Greenhorn
    Posts: 27
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Trying to run the exact code in a query tool for your database is the best thing to do when something doesn't work in your application. Oftentimes I will write a query in such a tool *first* to make sure it works right, then move it to my application. [Oh, to have stored procedures!]

    But, something else to consider is case-sensitivity. Remember that by default MySQL uses the case-sensitivity of the operating system it is running on. If you're on *nix, and haven't told MySQL to ignore case, you will be told a table doesn't exist if you have it cased wrong. For example, if your table is InternalTime in the database, and try to SELECT * FROM internaltime, you'll get an error.

    Peace,
    Phillip
     
    Patrick Mallahan
    Ranch Hand
    Posts: 69
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    This is my query:



    its giving me a syntax error.
     
    Patrick Mallahan
    Ranch Hand
    Posts: 69
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    okay all, let me start by saying thanks for all the input, i actually learned some things that I will need later i am sure. I realized what happened, I forgot to check "create databases that dont exist" when i restored my backup. which is why it didnt exist. The reason I thought it existed was because I had been connecting to my production server on accident not realizing it so i saw the database there. Thanks again, i have it working now, now all i need is a drink . I know this was a n00b move , which is funny cuz i dont think I am a n00b.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic