Results 1 to 5 of 5
- 08-22-2009, 09:41 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 36
- Rep Power
- 0
Database Project keeps throwing Exceptions.
Hi, I'm working on a Database project in NetBeans and I'm encountering several
problems with my application. I use Vectors in one class to store several
variables which is sent to my JTable in another form. I keep getting several
exceptions.
java.sql.SQLException Cannot find driver for jdbc:odbc
and also a lot of :
NullPointerExceptions
Please help, I'm really lost, please request if I need to post code.www.talkbinary.com - for anyone that wants to get a new C++ forum on its feet.;)
- 08-24-2009, 12:32 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Post the first 5 lines of the exception stack traces. They will contain exact line numbers of where the problem was found in your code. They also give you hints on how to solve those problems.
- 08-24-2009, 05:49 PM #3
Member
- Join Date
- Sep 2008
- Posts
- 36
- Rep Power
- 0
Yes
Hey, I was able to fix the problem by redesigning my DatabaseAccess class and at least I'm able to connect with my Database and extract some data now. Only, not all of the things I do actually work.
Can't seem to be able to a specific something, namely to display all the players that won their games.
SQL code I used
String sql = "SELECT ID, Name, Surname, AmountWins, Win/Lose/Draw From TBTournament WHERE Win/Lose/Draw LIKE '0'";www.talkbinary.com - for anyone that wants to get a new C++ forum on its feet.;)
- 08-24-2009, 08:39 PM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
I doubt if there is any database that will accept the SQL statement you posted above. It may be better to go through the tutorial that came with your DB installation to learn the syntax.
- 08-30-2009, 11:22 AM #5
Member
- Join Date
- Sep 2008
- Posts
- 36
- Rep Power
- 0
Hey, I finally fixed the problem, not only that, when I was able to fix the problem above, I implemented the same idea towards some other sql statements that also moaned. Now everything's working fine! Thanks, I have to admit, after getting the 'too few parameters 1 Expected' exception at least a 100 times, I began to blame it on NetBeans etc... Turns out it was my own human error in my SQL code specifying a Column that did not exist, anyway thanks!
www.talkbinary.com - for anyone that wants to get a new C++ forum on its feet.;)
Similar Threads
-
For loops and arrays throwing up errors
By Banjo in forum New To JavaReplies: 2Last Post: 11-25-2008, 06:40 AM -
throwing bug value
By Dangi in forum New To JavaReplies: 3Last Post: 10-25-2008, 06:14 AM -
Display Message Without Throwing Exception
By kailashchandra in forum JavaServer Faces (JSF)Replies: 0Last Post: 09-27-2008, 09:05 AM -
throwing Exception
By bugger in forum New To JavaReplies: 3Last Post: 11-09-2007, 09:35 PM -
Project of Exceptions
By Albert in forum Advanced JavaReplies: 1Last Post: 07-06-2007, 03:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks