This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

database connection using ms access  RSS feed

 
rafael pascual
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a problem with my database connection...i am trying to get all the data in my database wherein my identifier is an integer...i chose autonumber in ms access...now what is wrong with my statement??
String sql = "SELECT * from tableName where studNum = '" + Integer.parseInt(txtNumber.getText()) + "'"

there is an exception and it says there that there is a type mismatch...

thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65970
140
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rafael pascual:
there is an exception and it says there that there is a type mismatch...

Showing us the actual details of the exception would be a good start to getting this solved.
[ October 16, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!