Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

database connection using ms access

 
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
Pie
Posts: 64843
86
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