Access database/ java application/ jdbc odbc

i am building an access database with a java application and get the following error message when i try to run the application. the log in window that i have does not have a password text field, only a field for the odbc name.
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Not a valid password.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2488)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:317)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:160)

User/password are usually necessary to set up the ODBC source. So you may need find out who set up your ODBC source. Or you need find the correct user/password and reset the ODBC source.
PC

Similar Messages

  • Remote Database connection throught JDBC-ODBC

    Hi everybody
    I've developed an application which connects to a MS Access database throught the JDBC-ODBC bridge; if the database is on my local machine I've no problem at all, but I now need to connect to a database on a remote PC. I've set the DSN entry for the database on the remote computer and try to connect using something like:
    String db_name="jdbc:odbc:remote_pc_name\\\\DSN_db_name";
    Properties db_prop=new Properties();
    db_prop.setProperty("user","username");
    db_prop.setProperty("password","user_password");
    Connection dbconn=DriverManager.getConnection(db_name,db_prop);
    but the ODBC driver gives me the message
    "[Microsoft][ODBC Driver Manager] DSN not found and driver not specified.
    I've tried other possible "connection strings" but I always get the same message.
    The software works properly if I connect to the local DB with:
    String db_name="jdbc:odbc:DSN_db_name";
    Any idea how to connect to a remote DB through ODBC?
    Thanks

    No need for a separate thread really is there? its still relevant to the original.
    import java.awt.*;
    import java.sql.*;
    public class JDBC1 extends Frame {
         private static final String DB = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=\\\\http:\\\\www.cs.stir.ac.uk\\~dcl\\databasename.mdb";
         public static void main(String[] arguments) {
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
                   System.out.println("Driver registered!");
                         Connection conn = DriverManager.getConnection(DB, "", "");
                   System.out.println("Connected!");
                   Statement st = conn.createStatement();
                   System.out.println("Statement created!");
                   ResultSet rec = st.executeQuery("SELECT * FROM people");
                   System.out.println("Queried!");
                   while( rec.next() ) {
                        System.out.println( rec.getString(2) );
                   st.close();          //close the statement
                   conn.close();          //close the connection
              catch( SQLException s ) {
                   System.out.println("SQL Error: "+ s.toString() + " " + s.getErrorCode() );
                   s.printStackTrace();
              catch( Exception e ) {
                   System.out.println("Error: "+ e.toString() + e.getMessage() );
    }

  • How java application can access other java application

    Hi everyone,
    Please help me, I need to know how I can make my java program,
    specifically a servlet, access other java application continuously running a single instance in java virtual machine, and vice-versa.
    thanks in advance

    A java application is just a bunch of classes with one designated as a main class. You can simply ensure the classes are available to the server's jvm and then load and run the "external" program as part of the servlet process.
    If you have full access, and which external program is to be run, you can simply import it in your source.
    If your don't have the details at run time use the java.reflect.* stuff to load and run the class dynamically.

  • How to append records in MSAccess through Java using JDBC:ODBC

    Hello,
    I was able to retrieve records from MSAccess database through JAVA over the JDBC-ODBC bridge.
    If I want to append records to a table (for eg. photo1 table containing photono., length, breadth, area as
    columns) I could not able to do so through JAVA.
    I am using JTable with the above fields. The user is displayed with the JTable and he has to enter
    data inside the JTable and press a button titled "Append". Then the JAVA program should append
    whatever the user has entered in the JTable as a single record inside the MSAccess database.
    Can anyone help me please?

    hi i too am having similar problem. i am able to create a table in ms access through java but when i insert values i get a msg that it has inserted the values but when i check the table by opening ms-access there are no values in the table.
    the insert statement i am using is
    " insert into tk1 values(3,'tarun')"
    further i tried using the methods commit, setAutoCommit etc with the connection object. -NO GO.
    can you help me ?

  • Internet Accesses Freeze Java Application

    I have been programming a Java application, which is actually an instant text messaging system, that obviously makes internet accesses.
    The thing is, I have got this JFrame, with JScrollPanes, JTextAreas for messaging, and whenever the user presses the magical 'send' button; till the reply comes, the window freezes; you know it turns into grey.
    The way I send the messages is just to call the method that makes the connections and writes the data.
    How should I modify my code that my application should not freeze while waiting response? Is there a way to decrease the priority of a method or something?
    Thanks in advance..

    To clarify a bit.
    When you press the button an event is generated and put into the
    event handling queue (which handles all awt/swing events such as redraws/resizes etc). The Queue is processed by the event processing
    thread which pulls the button pressed event from the queue, finds
    the associated eventHandlers and calls them. What this means is that
    any code inside your event handler is run in the Event handling thread
    which causes it to not be able to handle any more events until the
    code in your handler is finished. Therefore all refreshes/button presses
    /resizes etc. (everything to do with the GUI and some other bits too)
    stop responding until your handler returns. Creating network connections
    can take a fair bit of time which means your handler takes a fair amount
    of time which means that the GUI locks up for a fair amount of time.
    Right, that there is the reason your GUI stalls.
    now, as pkwooster said, the way around this is to create a seperate
    thread that handles your connections to the internet. At the simplest
    level this thread can be created inside your "button pressed" event handler
    . For more complex solutions you will need to find someway of notifying
    a running thread that you have more work for it.
    pkwooster also said that there is a lot of code in this forum on topics
    related to the task you are attempting. You might wish to take his
    advice and look for it.
    matfud

  • JavaCard applications on SIM accessing personal Java applications

    Are personal java applications also applets just like Java Card Applets.
    Also i am programming the SIM of the mobile phone which is a Java Card.
    How can a Personal java application on the phone communicate with a JavaCard application on the card or vice versa. Please Note that for the user they are similar.i.e. they exist side-by-side on the same menu of the phone with the user having no clue that the application resides on the phone ( a personal java application) or on the card( a javacard application).
    Can anyone tell me of some way for one personal java application to access a JavaCard application?
    Thanks
    SKhan

    At the moment there exist no way to access the Java Card / smartcard in a J2ME/personal Java device. Currently we are working in JSR177 on the problem.

  • Accessing database Variables using JDBC

    Hi,
    I have a question for some of you Java specialists out there.
    I want to execute a select statment in my database (SQL Server 2000) and store the output in a variable. - The reason I am not directly executing the SQL statement from my JDBC connection is that I need to execute a number of SQL statements and then finally would like to store my result set in a variable in the database - NOW, my question is , how do I (If I can) access a database variable using either servlets or JSP. Any help is welcome.
    A quick response would be much appreciated.
    thanks

    We are probably talking about different things.
    ASP, at least when I used consisted of the following:
    -html
    -server side script (vbscript, javascript, perlscript)
    -client side script (usually javascript but it could be vbscript and perlscript)
    In the above you have three possible kinds of variables java, perl, vb. In each of those languages you can use SQL text to manipalate data in the database. However the text itself never ran in the ASP server nor was there such a thing a SQLscript, so there was nothing that was a SQL variable.
    However, if I write a stored procedure in Oracle, it can definitely have variables. And likewise a oracle package can have variables. But there is no way to directly use those variables in ASP. The value of the variable would have to be returned to the ASP script language and a variable in tha language could contain that value.
    Perhaps I just don't understand ASP or it has evolved in the last 3 years. If so then ignore everthing I have said.

  • Remote access database using Application Server Control Console

    When I install the Oracle Application Server 10g, it gives me a web-based tool, i.e., to use the Application Server Control Console to manager/monitor the server.
    Now If the Application Server is installed in a remote location, and there is no LAN connection to it, can I still access it via the Application Server Control Console? (i.e., via the HTTP protocol). (I believe that I can only use the Console to manage the AS which is physically located in the same machine).
    Thanks
    Scott

    Hi Scott!
    The ASC will allow you only to manage its own installation. So if you have 10 AS instances you will have 10 ASC's to manage it.
    If you want to remotely manage your installations you need the Grid Control.
    Otherwise you will need a connection to the machine.
    I do not understand the issue about the "no LAN connection"? How do you want to access the machine if there is no network connectivity anyway?
    cu
    Andreas

  • Accessing Non Java Applications thru Java Program

    Hye guys,
    I need help regarding this :
    Suppose I have a application which is non Java and application have several windows. Can I through a Java Program get the information abt the most active topmost window of the application?
    I think that only windows Task Manager knows abt the application and the child process(which is a different windows in this case ) and thus my Java Program have to do the low level system programming to
    get info from the task Manager, but that will be make my program platform dependent.
    Can we have a generalised program for this problem?
    Help in this regard will be highly appreciated..
    Thanks a lot

    Hm, a platform-independent way to get information about OS-specific processes? Not likely.

  • JDBC-ODBC bridge connection failure.

    I'm new to JDBC and JDeveloper and am having some difficulty
    getting through the database applet tutorial.
    I'm trying to connect to a Microsoft Access database using the
    JDBC-ODBC Bridge. This is an interim stage before using a Linux
    Oracle database which is not yet up and running.
    When trying to add a data form, the database wizard fails at
    step 4 of 7 after selecting the Sun JDBC-ODBC bridge and the
    required data source the following error is presented:
    Connection error
    Vendor code 84
    [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
    I also tried setting up (using ODBC manager) a System DSN for a
    text and Excel data source, but met similar problems e.g:
    [Microsoft][ODBC Excel Driver]Driver not capable
    Currently JDeveloper Beta 2.0 (build 184) and the ODBC source
    are on the same NT4.0 (SP4) machine.
    To confuse matters I'm actually running Access 95, rather than
    Access 97.
    I have previously successfully connected to an Access ODBC
    source via JDBC in a Java application (not applet) when
    following a tutorial example that comes with the Sun JDK 1.2. I
    note, however, that jdbcodbc.dll that's part of JDK 1.2 is newer
    (and bigger - 32K 01Dec98) than that supplied with the
    JDeveloper Beta 2.0 (22K 05Nov98)
    I'm a bit lost with this problem since nothing happens after
    pressing help on the error dialog, and I'm not sure where to
    look for log files etc. to further debug the problem. Any help
    would be gratefully received!
    null

    The error indicates that the bridge is making a call to the
    driver which it cannot handle -- either because the call is
    invalid/unreasonable or because the driver doesn't implement the
    functionality requested. An ODBC trace will determine which of
    the two is true. If the first, you need to contact the bridge
    provider to get a fix. If the second -- the ODBC driver
    provider.
    null

  • How to store the data read from excel using java code in Ms access database

    Hi. I wrote a code to read the data from excel. May i know how can i save it to Ms access database using java. Also i have many excels. So i should not connect the database using DSN. So is there any other way to achieve this?

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • Accessing MS Access Database file from Sender JDBC in PI 7.1

    Dear Experts,
    I am on SAP PI 7.1 SP00. PI Server is installed on LINUX Server.
    I am doing an scenario, where i am going to process the .mdb file through Sender JDBC Communication channel . I have put .mdf file in FTP server.
    When I check in communication channel Monitoring getting below error :
    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//pi_integ/abc.mdb' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Can not establish connection:: SQLException: [unixODBC][Driver Manager]Data source name not found, and no default driver specified'
    I have seen many blog, but I am helpless. Could you kindly provide your suggestions.
    Really appreciated your efforts and your valuable time.
    Ahmed.

    To connect to an Access Database, I create an ODBC data source and use the "sun.jdbc.odbc.JdbcOdbcDriver".

  • How to run jdbc:odbc driver for MS Access in Beam Managed Persisten Entity

    Hi friends,
    I like to know how to access an MS Access Database using a BMP Entity Bean. I like to know how the connection is established. Can we use the Class.forName(). I'd like to recieve the 3 to 4 line code. :)
    Please Help
    Thank YOu!!

    rampalli_aravind wrote:
    Hi friends,
    I like to know how to access an MS Access Database Google "Sun JDBC tutorial".
    using a BMP Entity Bean. Really? How quaint!
    I like to know how the connection is established.
    Connection c = DriverManager.createConnection(url, user, pass);
    Can we use the Class.forName(). Yes.
    I'd like to recieve the 3 to 4 line code. :)I've got you halfway there. The rest is left for you.
    Please HelpI think I did.
    Thank YOu!!No, thank YOU! Where would this forum be without stoopid questions like yours?
    %

  • How to store the data captured from oscillosco​pe into the MS Access database table

    Hi All,
    In my application, I tried to save the data captured from SCOPE, but could store only 200 bytes. I've taken the Memo data type for the field in database. I want to store all data ( 4 channels) in one field & retrieve back and display on the XY Graph.
    Thanks in advance.
    Regards,
    Shrini

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • Jdbc-odbc connectivity problem in[b] wsad5.1.2[/b]

    while i Try to access the msaccess database using sun.jdbc.odbc.JdbcOdbcDriver,the server is giving the error class not found....sun.jdbc.odbc.JdbcOdbcDriver......
    I have already rt.jar containing this class in my jre...
    The same thing i tried in wsad5.0 and it is working abs fine....
    If anyone has got a time to solve tis query plz help me out...
    Its urgent......

    well,i think nobody has interest in my question.I have asked two questions.
    1)Can anybody tell me the compatibilities of JDBC-ODBC bridge versions,oracle and ODBC drivers?
    2)And can u tell me how to connect to oracle through a pure Java JDBC drivers (type 4 drivers) on a standalone system?
    But u advise me not to use JDBC-ODBC bridge without studying the other part.

Maybe you are looking for