google analytics code

21 December 2006

SUCCESSFUL EXECUTION OF MY FIRST JDBC PROGRAM, WITH A DIFFERENCE!!

connecting java program to the ms access database successfull!!
Atlast, on 19 dec 2006, i have successfully executed a program which connects to the MS ACCESS database, instead of the SQL SERVER [which i dont have in my system], retrieves data and shows it in the command prompt.
This came as a relief to me as everywhere, only the SQL SERVER is being used[at study centre], and i just thought of finding out if i could connect to ms access and work on it..
We just need to change the "MyDataSource" in the program to "MS ACCESS 97 DATABASE" (not case sensitive) or whatever is the name shown in the DSN list in your system.
It wasnt easy though. Initially, it shows a runtime error, something like "cannot access the database"...etc..
Then i changed the acount name and password.
AND IT WORKED STRAIGHT AWAY!!
I hope this can help me in getting in depth idea about all the JDBC and stuff related to it!!

2 comments:

  1. Anil, have you used ODBC JDBC Bridge? Or did you try using MSDE with JDBC Driver from Microsoft? There are other types of database (such as mysql and apache derby) that you may be able to run on your PC without using much resources and access them using JDBC too.

    ReplyDelete
    Replies
    1. Thanks for your comment. I dont remember it now since it was more than 15 years from my java programming and now I am completely into UI technologies(HTML5, javascript, css). Somehow missed your comment during all these years of running for work!

      Delete

I would love to hear your comments and will do my best to reply to your comments and get back to you! :-)