MS Access help

Hi,
I'm a novice java user. Right now, I am trying to create a database on Microsoft Access. I have already configured the (Data Sources) ODBC in the administrative tools. I have also created the database in Access.
But when i run my program, I got this message:
java.sql.SQLException: No suitable driver
     at java.sql.DriverManager.getConnection(Unknown Source)
     at java.sql.DriverManager.getConnection(Unknown Source)
     at DBQuery.main(DBQuery.java:16)
Can someone help me with this problem?
Thanks...
if u need to see my code...
import java.sql.*;          //java.sql package supports JDBC
public class DBQuery {
     public static void main(String[] args){
          // Step 1: Loading JDBC-ODBC Bridge Driver
          try {
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          } catch(ClassNotFoundException ex) {
               ex.printStackTrace();
               System.exit(1);
          try {
               // Step 2: Establish a database connection
               Connection conn = DriverManager.getConnection("dbc:odbc:ptxxODBC");
               // Step 3: Request for a java.sql.Statement instance
               Statement stmt = conn.createStatement();
               // Step 4: Prepare a SQL SELECT query string.
               // (Ensure proper space between words)
               String queryStr = "SELECT name, score FROM particulars " +
                    "WHERE score < 90 ORDER by score DESC";
               System.out.println(queryStr);                              // for debugging
               // Step 5: Pass the SQL query string into the Statement object,
               // issue database query thru method executeQuery()
               // The result of query is kept in an object of class ResultSet.
               ResultSet rset = stmt.executeQuery(queryStr);
               // Step 6: ResultSet object likes a "sub-table" with columns and
               //     rows that match the query criteria.
               //     Process the ResultSet row by row using a while loop
               System.out.println("The records selected are:");
               while(rset.next()) {
                    String name = rset.getString("name");
                    int score = rset.getInt("score");
                    System.out.println(name + "\t\t"+ score);
               // Step 7: free resources, Close Connection
               rset.close();
               stmt.close();
               conn.close();
          } catch (SQLException ex) {
               ex.printStackTrace();
}

sample:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class SelectDB
  public SelectDB()
  public static void main(String[] args)
    SelectDB selectDB = new SelectDB();
    String pid = "";
      try{
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
         Connection con = DriverManager.getConnection("jdbc:odbc:TESTDB","","");
         String sqlQuery="select * from table";
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(sqlQuery);
         while(rs.next()){
            pid = rs.getString(1);
         System.out.println(pid);
      } catch (Exception ex) {
        ex.printStackTrace();
}

Similar Messages

  • 2011 15 in Mac Book Pro. Can't access help. Keep getting error message computer not connected to internet. But compute is connected to internet.

    When I try to access help in my 2011 MacBook Pro I get an error message that I'm not connected to the internet. But I know I am connected to the internet because I'm getting email and surfing the web at the same time. Any ideas?

    Firewall of some type blocking whatever port the help system uses?
    Router setting?

  • Accessing help causes Dreamweaver to crash

    I'm quite frustrated due to the crash of all help functions
    that are not on the web for my new install of Dreamweaver. I'm
    running on an HP laptop and when I go to the help menu or click on
    a help button I get the "send / don't send" crash dialogue for
    Dreamweaver.
    If I go to the help files directly, outside of Dreamweaver, I
    can open them correctly.
    Any idea what might be tangled up in the install?

    See if this TechNote helps:
    Dreamweaver crashes when accessing help system when Internet
    Explorer 7 is
    installed
    http://www.adobe.com/go/6d7a2c59
    David Alcala
    Adobe Product Support

  • Java Access Helper Jar file problem

    I just downloaded Java Access Helper zip file, and unzipped, and run the following command in UNIX
    % java -jar jaccesshelper.jar -install
    I get the following error message, and the installation stopped.
    Exception in thread "main" java.lang.NumberFormatException: Empty version string
    at java.lang.Package.isCompatibleWith(Package.java:206)
    at jaccesshelper.main.JAccessHelperApp.checkJavaVersion(JAccessHelperApp.java:1156)
    at jaccesshelper.main.JAccessHelperApp.instanceMain(JAccessHelperApp.java:159)
    at JAccessHelper.main(JAccessHelper.java:39)
    If I try to run the jar file, I get the same error message.
    Does anyone know how I can fix this?
    Thanks

    Cross-posted, to waste yours and my time...
    http://forum.java.sun.com/thread.jsp?thread=552805&forum=54&message=2704318

  • Unable to access help for e-business suite

    Hi ,
    We are on R12.0.4. We are getting this error while accessing help .
    "Help target US/AP/@APXSSFSO_FINANCIALS_SYSTEM_PARAMETER could not be found."
    Any help will be appreciated.
    Best regards,
    brinda

    Hi brinda;
    We are on R12.0.4. We are getting this error while accessing help .What is OS? When u are getting this error,i mean accessing where? login page-forms etc.
    "Help target US/AP/@APXSSFSO_FINANCIALS_SYSTEM_PARAMETER could not be found."Is this compliate error? It was working before,if yes what u have been changed?
    Please look at Note:R11: FRM-40735 WHEN ENTERING FINANCIAL OPTIONS IN APXSSFSO FORM - RELEASE 11 [ID 1057440.6] and see helpful
    Regard
    Helios

  • Java Access Helper problem

    I just downloaded Java Access Helper zip file, and unzipped, and run the following command in UNIX
    % java -jar jaccesshelper.jar -install
    I get the following error message, and the installation stopped.
    Exception in thread "main" java.lang.NumberFormatException: Empty version string
    at java.lang.Package.isCompatibleWith(Package.java:206)
    at jaccesshelper.main.JAccessHelperApp.checkJavaVersion(JAccessHelperApp.java:1156)
    at jaccesshelper.main.JAccessHelperApp.instanceMain(JAccessHelperApp.java:159)
    at JAccessHelper.main(JAccessHelper.java:39)
    If I try to run the jar file, I get the same error message.
    Does anyone know how I can fix this?
    Thanks

    sorry ab the multiple post, it was urgent for me to
    know the answer.
    I've JDK 1.4.2 and JAccessHelper should work with 1.3
    or later
    Can there be some kind of path problems?No, I doubt it. It's just some internal app failure - looks like it's trying to determine the running Java version, and is not doing a good job at it. But the failure has nothing per se to Java, it's that specific app - what are we supposed to know about that app though?

  • Adobe reader 11.0.07 can not access help option

    I just downloaded adobe reader 11.0.07 version and I haven't signed up for the paid options, I only use this for reading
    Is this why I can't access help option on adobe reader 11.0.07?
    Any insight is appreciated!

    Dear Pat,
    Thank you for your email.  My operating system is Windows XP and my default browser is google chrome.
    When I click on help on Adobe Reader 11.0.07 and select "Adobe Reader XI Help".  I receive an error message:
    "Online help content cannot be displayed.  Verify you can launch your web browser and have access to the internet."
    Maybe you can make sense of this!
    Thanks,
    Pavel

  • Can't access HELP in Photoshop CS5

    When I click on Help in Photoshop CS5 (installed yesterday), I recieve a popup message from Adobe Community  Help saying "The requested page requires an Internet connection," and I cannot do anything with the Help screen.
    I have an Internet connection.  In fact, if I open my Photoshop CS4 program, I can access the Community Help, it opens IE to the online help page for Photoshop CS4, where in the lower right-hand corner there is a yellow box with a link to CS5 help which if I click on it produces the Photoshop CS5 Help page.
    So why can't I access HELP from CS5 Photoshop directly,and how do I tell CS5 that I have an Internet connection.
    As a side note, this is also a problem with Illustrator CS5.

    The problem is solved.
    I went and found the executable for Community Help.  It is Adobe Help.exe.  I then ran it and received the following message: To access or download help, connect to the Internet or deselect “Display Local Help Contents only” in Preferences.
    Well, I could not find any such thing in Photoshop preferences. It then dawned on me that I should be looking in the preferences of Community Help.  And there it was—the option to display local content only.  However, it was set to no, so I should be seeing help from the Internet.
    That is when the previous remark about the firewall came back to me, and I realized that what was needed was to open the firewall for Adobe Help.exe and not for Photoshop.
    Thanks for your assistance

  • Where is Access Help (on-disk help)

    My T500 came pre-loaded with Vista and I did a clean install of Win 7 x64 using the DVD from Lenovo.
    When I press the ThinkVantage button, the ThinkVantage Toolbox pops up.  Although this provices a link to on-line help, I wanted to get the Access Help on-disk help files.  I downloaded the file from Lenovo (6htb02us and it went through the install routine OK.  The ThinkVantage button still brings up the Toolbox.  There is a folder C:\Program Files (x86)\ThinkVantage\AHLP, but the only files there are the AccessHelp icon and DISKAHLP.ID and DISKAHLP.VER files.
    The actual help files  (*.chm) seem to be in C:\Win\Drivers\AHLP, but none of the executables in that directory or its subdirectories seems to actually run the help program.
    How do I get AccessHelp to run?  What is the name of the executable and where should it be located?

    I am really new to all this myself, and my month-old Thinkpad came with W7 factory-installed. I have no idea if this will help you, since you upgraded, but I access my *incomplete* (missing physical parts key guide that would match up with the numbers on the diagram pictures, as well as a glossary that would define unfamiliar terms and acronyms in the missing key guide) offline Lenovo Access Help files by pointing mouse at Start button on the left end of my main toolbar, which drops down (I keep my toolbar on the top of the screen) a menu with two lists: on the far left it lists recently used programs, then the list on the right is topped with the avatar icon that I chose for the first page where I log in my password, followed by my name, and then a number of various entries like Pictures, Documents, Favorites, Computer, Control Panel, etc., ending with Run... Right before Run..., there is an entry for Help and Support. When I click Help and Support, I get a window with 5 different options groups, and the offline Lenovo Access Help files is the first set in the upper left corner of the window. Sorry, I don't know if this will work for you, or if you have already tried it, just my naÏve 2¢. Good luck!

  • My Ipad connects with my hotel wifi, but does not indicate that it is a secure wifi, even though it requires a password to access - no lock symbol, hence no password request, hence no internet access - help.

    My IPad connects with my hotel wifi, but does not indicate that it is a secure wifi, even though it requires a password to access - no lock symbol appears against the wifi network, hence no password request, hence no internet access - help. My collegue who also has an Ipad can access the same wifi with ease, so it must be something to do with the settings on my machine, although checking the two machines, there appears to be no difference in the settings.

    My experience with hotel wifi is that it's an open, and unsecured, connection, but unless you agree to their terms on a launch page, you can't go any further or connect. Sometimes I need to force safari to come up and even make it go to a page, to trigger the auto load of the 'agree to our terms' page.
    Unless your machine is work provided so maybe could be blocked from unsecured net access?

  • Accessing Help in DreamWeaver

    I am a new user for DreamWeaver. The only help that I have
    access to is a pdf file. Am I the only one who is unable to use the
    F1 key to access help in DreamWeaver?? I have uninstalled and
    re-installed but that didn't change anything.
    This is the response listed on the help screen:
    "This topic is in the Help system of another product. To view
    the topic, install that product. about:blank"
    I don't understand this and the technical support in Adobe
    didn't help me either.

    > I have DeamWeaver CS3 and I am using Windows XP
    till it's sorted out- there is a live copy of the dw help
    files here:
    http://livedocs.adobe.com/en_US/Dreamweaver/9.0/
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Cannot open Access Help

    I have a Thinkpad T500 with WINDOWS 7. In spite of using recovery discs (advice Lenovo), I am not able to open the so-called on-line handbook via the link ACCESS HELP (you come there via HELP AND SUPPORT). I see the message popping up: "cannot open the file masteraibl.hcm::/welcome.htm".  I did hardly use or transport this labtop and no other programmes are on the labtop excepted the Norton security. The other links you see when clicking on HELP AND SUPPORT all work. I estimate that it is an error in the software in the connection between WINDOWS 7 and the LENOVO ACCESS HELP. Any help to overcome this weird problem is welcome.

    Anything you put inside your home folder, except for ~/Public and ~/Sites, is inaccessible to any other user on your Mac.
    If the app you run requires items to be placed in ~/Library, you'll need to make duplicate copies of those and put them in the ~/Library of your other user account.
    The easiest way to do this is to temporarily move the items from ~/Library to ~/Public. Then log into your other account, and copy them from the other user's public folder to ~/Library. Then log back into the other account and return the items to ~/Library.
    Keep in mind that changes made to these items in one account won't be made automatically in the other account. You'll have to make any changes twice.
    A better option, if the app supports it, might be to keep the items in /Library at the root level of your boot drive instead. All users can read files in there by default.

  • Acrobat Pro X - W7 64-bit - can't access Help

    Hello. I'm working with a brand new install of Acrobat Pro X on my Windows 7 64-bit machine. Acrobat is working fine as far as I can tell. Except that when I try to access "Help" I get the message that a required application library or file for the Help is missing" and to please reinstall the application. Should I? Should I uninstall first? Is there a less dramatic fix?Thanks much.

    I use a hardware firewall and Windows Firewall (for whatever that's worth). Neither squawked at this installation. I checked the quarantine bin for defender and the only inhabitant isn't this. Likewise, my antivirus - which *does* squawk when threatened, didn't with the acrobat install. I did check the quarantine for my AV and there's no adobe entry. I also checked my anti-malware and, again, nothing. And I checked Windows Defender with, again, no results.
    But wouldn't it be unusual for either firewall or AV to block only a portion of a software package? Thanks for the ideas.

  • Cannot access help topics in Finder

    Unable to access help topics in Finder; help topics are listed but will not open when selected; window closes.

    Hi Pkirillov,
    to solve your problem you need:
    1- Update the firmware to:
    https://www.dropbox.com/s/0nrtbhhd0nu4mz1/Gemini_v2_6_3-1035.tar.gz
    2- Open terminal and use this command to mount:
         sudo mount -t nfs -o resvport <server ip address>:/mnt/ide1/<sharename> /<mounting point>
    OR: apple+K (( connect to server)):
         smb://username:password@<server address>/<sharename>
    Hope this will work for you
    Cheers

  • Bought PE 13, installation and registration OK. Want to access 'Help / first steps...(as well as the other options): always get message: no connection to the Internet. Which is obviously not true!!

    I can only repeat: I Bought PE 13, installation and registration OK. Want to access 'Help / first steps'...(as well as the other options): always get message: no connection to the Internet. Which is obviously not true!!
    hakune
    P.S. the way to get through to be able to post my problem is not very userfriendly.

    Pe won't contact net please see Sign in, activation, or connection errors | CC, CS6, CS5.5 - http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html for information on how to resolve the connection error between the computer and our activation servers.

  • Access Help

    I cannot open Lenovo Access Help on my new Lenovo Thinkpad W510. I get the massage "The file masteraibl.chm::/Welcome.htm cannot be opened.
    Can anybody possibly help?
    Solved!
    Go to Solution.

    I have just installed Access Help from this link, but have noticed that it is the us-version. I know that there exits a danish version of Lenovo Access Help, does anyone know how to get it.

Maybe you are looking for

  • Tata Photon max on Huawei EC 315 is not working on Mac OS X 10.10

    Hi All! I have bought a Tata Photon max WiFi (Huawei EC 315) dongle, which is not working on Mac OS X 10.10. Does anybody know what is the problem? Do I need a different dialer? Do I need a new driver for the Huawei dongle? I didn't find satisfying s

  • Purchase: Material 'X' is ordered, but components A, B, C & D are supplied

    Hi, We have following scenario in purchase: 1.  We are creating Purchase Order for material code 'X' 2. But, vendor does not supply us material 'X' (instead vendor supplies us the components required to assemble 'X', for example: A, B, C and D) 3. We

  • Problem opening a document

    I recently added two pictures to a project I've been working on and all of the sudden some things became wierd so I saved it, shut it down and re-opened it to find out that it DOES NOT WORK! All I see is a blank page and the clock goes bananas! I wil

  • Mapping Problem.. I Need to pass Unique value everytime to Target filed.

    Hi All, I need to pass some unique value everytime the message processed to the target field.    Source filed ---> Target Field can anyone has the UDF to generate like this.. ? I heard that through RFCLookup we can do that.. by maintaing some table a

  • How to rollup cube data in Process chain?

    I have loaded data into a cube, and when i look at the technical status it is green but there is nothing in the "request for reporting available"box. I went to Rollup Tab and manually execute the request. It worked. But is there anyway that I can add