aspose file tools
The moose likes JDBC and the fly likes How can i connect MS Access from JDBC Program ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How can i connect MS Access from JDBC Program ??" Watch "How can i connect MS Access from JDBC Program ??" New topic
Author

How can i connect MS Access from JDBC Program ??

Sirish Kumar Gongal Reddy
Ranch Hand

Joined: Oct 25, 2004
Posts: 109
Hello,
Rcently i was encounter a problme what it is,
How can i connect MS Access from JDBC Program,iam using jdbc-odbc Driver and i select Odbcdriver for MS Access,can you guess what the problem is ?
one more thing my program is compiling fine but not getting any out put ?
Thanking you,
Regards,
G Sirish Reddy.,

Code:
....
...
...
ResultSet rs=stmt.executeQuery("Select * from [$emp]");
while(rs.next()){
S.o.p(rs.getInt(1));
[ June 29, 2005: Message edited by: Bear Bibeault ]
Andrew Nomos
Greenhorn

Joined: May 31, 2005
Posts: 18
did you setup an odbc data source?

Originally posted by G Sirish Reddy:
Hello,
Rcently i was encounter a problme what it is,
How can i connect MS Access from JDBC Program,iam using jdbc-odbc Driver and i select Odbcdriver for MS Access,can you guess what the problem is ?
one more thing my program is compiling fine but not getting any out put ?
Thanking you,
Regards,
G Sirish Reddy.,

Code:
....
...
...
ResultSet rs=stmt.executeQuery("Select * from [$emp]");
while(rs.next()){
S.o.p(rs.getInt(1));
Wei Dai
Ranch Hand

Joined: Jun 22, 2005
Posts: 86
>One more thing my program is compiling fine but not getting any out put ?
> ResultSet rs=stmt.executeQuery("Select * from [$emp]");
Make sure that code hasn't thrown any exception. If no exception, that emp table should hasn't any rows. If you can't find any wrong, but you make sure that emp table has rows indeed, you have to use "select * from emp" through HXTT Access(www.hxtt.net) driver to verify that issue.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How can i connect MS Access from JDBC Program ??
 
Similar Threads
need a sample code JDBC ..preparedstatement
building a Jlist with the use of sql commands
how to retrieve data from postgresql using odbc driver
JDBC to MS SQL Server
How to run multiple query in MS Access?