Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:09:36+00:00 2026-06-15T01:09:36+00:00

Here is my issue. I’m working on an App for a client so that

  • 0

Here is my issue. I’m working on an App for a client so that they can update data into an MS Access database that is located on a web server. The server is set up for ODBC and I do have a DSN set up. I think I’m missing something in the syntax when it comes to actually connecting to the database. With the current code set up I’m getting a “No suitable Driver” exception thrown back.

I replaced the obvious un/pw with “user” and “pass”. I also replaced the url with the web server’s url address and the database file name with myDB.mdb

Here is my code:

//gets the connection driver
    try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (ClassNotFoundException e) {
        System.err.println("Driver name is incorrect or unable to be found.");
        e.printStackTrace();
    }
    try {
        Connection connect = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=D:url/db/myDB.mdb;","user","pass");
        connect.close();
    } catch (java.sql.SQLException ex) {
        // handle any errors
        error.setText(String.valueOf("SQLException: " + ex.getMessage()));
    }

I’m new to connecting to a database in Java so I’m sure I’m missing something simple, but I would appreciate any help I can get.

I’ve been researching this online for a few hours and have gotten no where.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:09:37+00:00Added an answer on June 15, 2026 at 1:09 am

    You shouldn’t connect directly from your phone to a database that’s sitting on a server somewhere.

    A better solution would be to set up a web service on the server that allows you to read/update the database, and then call that web service from the Android app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The issue here is that when my user logs into my app, they always
The issue here is I can see that the data is being written out
Having an issue here that I have tried everything I can think of but
after getting my answer here: Database issue, how to store changing data structure i
Have another issue here. Our app starts out with a tab activity. But, before
I am having some weird issue here. I have a database table which has
so I'm facing an issue here that I'm sure many a developer before me
Update the key issue here is an impedance mismatch between the ruby objects and
I recreated my issue here . The problem is that the 'left' div should
Here is issue that we have on one of our site: File/directory name bruteforcing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.