jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes database connection using ms access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "database connection using ms access" Watch "database connection using ms access" New topic
Author

database connection using ms access

rafael pascual
Greenhorn

Joined: Jul 17, 2007
Posts: 2
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

Joined: Jan 10, 2002
Posts: 61457
    
  67

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: database connection using ms access