Problem in connection with MS Access

when i am running the sample code below in jsp page using tomcat
as a webserver . no error is displaying i am getting the html page
displayed. but data is not retriving from the database.i use
Connection con= DriverManager .getconnection "jdbc:odbc:Database")- but no use no error no data retrival can any body help me
<%@ page session="false" %>
<%@ page import = "java.util.Calendar" %>
<%@ page import="java.sql.*" %>
<%
try{
     Class.forName ("sun.jdbc.odbc.jdbcodbcdriver");
catch(ClassNotFoundException e)
     System.out.println(e.toString());
%>
<html>
<head>
<title> DISPLAYING THE USER NAMES </title>
<body>
<center>
<br>
<br>
<h3 align=center> Users for the laptop </h3>
<table>
<tr>
<th> FIRST NAME </th>
<th> LASTNAME </th>
<th> USERNAME </th>
</tr>
<%
String sql = "SELECT * " +"FROM Users";
try {
String url = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Datbase.mdb";
Connection con=DriverManager.getConnection(url);
Statement s =con.createStatement();
ResultSet rs = s.executeQuery(sql);
while (rs.next())
%>
<tr>
<td> <% out.print(rs.getString(1)); %> </td>
<td> <% out.print(rs.getString(2)); %> </td>
<td> <% out.print(rs.getString(3)); %> </td>
</tr>
<%
     rs.close();
s.close();
     con.close();
catch(SQLException e)
catch(Exception e )
%>
</table>
</center>
</body>
</html>

Although for all your claims about no errors I see that this time your code shows empty catch blocks so really you don't really know that.
Please do something (print something anything, a stack trace) in that catch block.

Similar Messages

  • Vista - Connected with Limited Access???

    Please help!!! This problem is driving me mad. Every time I try to connect to the router whilst wireless it says "Connected with Limited Access"? I then plug the cable back in and "ta dah" it works fine. I have tried almost everything and cannot understand the problem - can anyone help?

    try this one out.. click start >> networks >> network and sharing center >> manage my wireless network >> and on this page remove all wireless networks listed and restart your PC.

  • My iPhone 5 got problem when connect with lighting cable, this will keep pop up message "this accessory may not be supported"

    My iPhone 5 got problem when connect with lighting cable, this will keep pop up message "this accessory may not be supported", I can't charge or sync at all. I tried plug and unplug many time, still can't detect/charge my iPhone5, but sometime will 'lucky' that can connect to my iTunes and charge battery…
    This message will auto pop up also when I don't have plug anything in my iPhone 5, It is very annoying…
    The lighting cable is original and now i'm using OS 7.0.4 / iTunes is 11.1.3
    What I can do to fix this problem? Thank you.

    I would try using another cable you can likely borrow one to test from somebody
    if it's the same then likely the connector in your iphone have been damaged

  • I have a problem to connect with FaceTime. I am using OS X 10.9.1 on a Mac PowerBook which is 4 weeks old. I can connect on iPhone but not from my computer.

    I have a problem to connect with FaceTime. I am using OS X 10.9.1 on a Mac PowerBook which is 4 weeks old. I can connect on iPhone but not from my computer. Does anyone have a similar problem???

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.

  • Problem in Connecting with the server

    I have a problem while sitting the e-mail. A message comes saying that the device had a problem in connecting with the server. My BB is Tourch 9860
    Please help me

    Hi gaf4u
    Welcome to BlackBerry Support Forums
    Do you already have any email account integrated with your device ?
    If not then do you have a specific BlackBerry data plan / BIS from your Carier on your account ?
    let us know.
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • Problem in connecting with Oracle

    hi everybody
    I have a problem in connecting with Oracle express 10g. I got an error that doesn't allow me to connect. hope anyone can help me and solve this problem
    --------------------Configuration: test - JDK version 1.6.0_20 <Default> - <Default>--------------------
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at DB.dbConnect(test.java:36)
    at test.main(test.java:18)
    this is the code that I'm following
    import java.io.*; import java.sql.*; public class test2 {   public static void main(String[] args) {     try {       Connection con=null;       Class.forName("oracle.jdbc.driver.OracleDriver");       con=DriverManager.getConnection(         "jdbc:oracle:thin:@PLANET:1521:ORCL",         "scott",         "tiger");       Statement s=con.createStatement();       s.execute("INSERT INTO BOOKS VALUES('A Tale of Two Cities','William Shakespeare',4567891231,'05-JAN-1962')");             s.close();       con.close();   } catch(Exception e){e.printStackTrace();} } }
    Edited by: Vantasia on Nov 12, 2010 10:18 AM

    1. Is the connection url correct?
    "jdbc:oracle:thin:@PLANET:1521:ORCL" is fine.
    2. Is the TNS listener started?
    c:\oracle\product\ora10\bin> lsnrctl status
    3. Is a firewall between client and database server?
    Connection url with firewall would be different.
    http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jdbcthin.htm#i1004276

  • Problem in connection with sql server

    hi ,
    i am facing problem in connection with ms sql server..please help me out.... i created the database ChandanClient...and there is one table Expense_code_Table...
    i want to insert the data into this table.. i am trying to create a demo example.. here is the code
    package demo;
    import java.sql.*;
    public class getdatabase {
         public static void main(String[] args) {
              Connection con =null;
              int ExpenceCode1=1;
         String ExpenceName1="exp_paper";
         String Organization1="exp_organization";
              try
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con=DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433");
                   Statement st = con.createStatement();
                   String q1="INSERT INTO Expense_code_Table(ExpenceCode,ExpenceName,Organization)VALUES("+ExpenceCode1+",'"+ExpenceName1+"','"+Organization1+"')";
         st.execute(q1);
              }catch(Exception e)
                   System.out.println(e);
              try
                   con.close();
              catch (SQLException e)
                   e.printStackTrace();
    after running program
    it is showing me...
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    java.lang.NullPointerException
         at demo.getdatabase.main(getdatabase.java:22)
    Exception in thread "main"
    please help me out how to solve this problem...
    thanks in advance...
    bye
    chandan sharma

    Put ur driver class files in the class path...
    regards
    Shanu

  • Nokia 616 connected with Sim Access to HTC Touch P...

    I have problems by connecting my HTC Touch Pro to my Nokia 616 with SIM Access (As Bluetooth Handsfree OK). It works with a 2G simcard but not with 3G sim-card. Is there any solution??

    Hi victorcarlsson
    Unfortunately there is little likelihood of any progress in this direction.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Odbc-connection with ms-access

    hello,
    this is my problem
    if I migrate an MS Access db to Oracle with the OMW than is the ODBC connection, from MS Access to Oracle, perfect.
    Bud I have used the migration script witch is generated by OMW and by made a connection from MS Access to Oracle in some tables the ODBC connection Failed.
    What is the problem????
    Thanks
    Andre

    You don't need MS Access installed to use the JDBC-ODBC driver.

  • Applet security problems while connecting with database

    i hav problem in the japplet connecting with sql database
    it gives security access denied error while running program as my driver is jdbc:odbc:bridge driver
    so for resolving this error how can i turn off security of applet and also which security permission to be change?
    plz reply

    baftos wrote:
    Maybe I should question the need to access a local database on the client PC.
    But anyway, the normal way to obtain security clearance is to use a signed applet.
    Another possibility is to grant the applet all permissions by modifying the security policy file of each client to grant your applet 'all permissions'. Note that in this case you must have access to each and every client PC or ask them to do so before running the applet.Database access at client's machine is ridiculous. I doubt this is what OP wants.
    @OP: request you to post the original security issue and the environment details.
    Thanks,
    Mrityunjoy

  • [help] Complicated problem of connection with N900

    I’m having a connection problem even before the firmware update. I can to access voip, skype, email, browser, some repositories. But never to have access services as the official repositories Nokia, Ovi, MaStory (wordpress) and Webtext (SMS voip).
    My firmware is 2.2009.51-1.002,  updated via NSU (USB cable), because the N900 could not connect via wifi or GPRS (ever time out).
    I already researched in maemo.org, but so far no one managed to solve the problem.
    Any suggestions on how to fix it? Thank you!
    Solved!
    Go to Solution.

    Not, everyone is a little different and do not allow change.
    Name: Nokia Applications
    Address: https://downloads.maemo.nokia.com/fremantle/ssu/apps/
    Distribution:. /
    Components: (blank)
    Name: Nokia System Software Updates
    Address: https://downloads.maemo.nokia.com/fremantle/ssu/002
    Distribution:. /
    Components: (blank)
    Name: Ovi
    Address: https://downloads.maemo.nokia.com/fremantle/ovi
    Distribution:. /
    Components: (blank)
    but deactivated and all and added as your new information.
    Result, none of the 3 connected, with this message in red:
    'https://downloads.maemo.nokia.com/./Packages
    Resolving host timed out: downloads.maemo.nokia.com'

  • I have problems to connect with Database Server in MDM SP5

    Hi,
    I am upgrading to SP and get problems to connect to the database server. I am able to start and stop the MDM server, but if I tru to create a new repsoitory or unarchive a repository I get this errormessage. "Unable to connect with Datase Server". In ealier versions og MDM i did not give any username or password whwn I made a new repositirt. Do you need to that no?
    I see in the mds.ini file that there is defined a user "Sql Server DBA Username=master ". I sthis the user we shall use or is there another user?
    Regars John-Kjell Hoset

    Hi John,
    I too faced the same problem and get rid of it by installing
    SQL Server 2000 Driver for JDBC Service Pack 3
    which you can download from
    http://www.microsoft.com/downloads/details.aspx?FamilyId=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en
    and i installed Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A
    which you can download from
    http://www.microsoft.com/downloads/details.aspx?FamilyID=413744D1-A0BC-479F-BAFA-E4B278EB9147&displaylang=en
    Install with setup SAPWD="YourPassword"
    I connected MDM Console wiht DBMS with Login credentials as
         UserName        sa
         Password         YourPassword
    Hope this help to solve your problem.
    Regards,
    Santosh.

  • Problems to connect with VNC to headless mac mini after sleep mode

    Hallo,
    I've a Mac Mini (late 2009) setup with Lion Server. I want to use it without mouse/keyboard/monitor attached. Since I want to safe power ( green IT ;-) ), I would like to use sleep mode.
    First thing I've learned is, that Lion Server prevents the mini to go to sleep after an idel time as set in power saving.
    The only thing that works, is setting up a shedule with sleep / wakeup times.
    When I start the mini, everything works great. I can connect via VNC. The Mini goes to sleep at the scheduled time and wakes up again as expected.
    From this time on, things begin to get strange:
    I can connect using VNC, but all i get is a grey screen with a moving cursor. So VNC is working, but there is no screen available on the Mini. Same if I use thightVNC from a Windwos PC. Get a grey screen.
    Further the system does NOT go to sleep at scheduled times any longer.
    I was able to track down the problem to the missing monitor: If the Mini wakes up without a monitor connected, I seems to wait to get the right resolution or what ever. All servives are working, SSH is fine even VNC works, but shows only a grey screen.
    I've been playing with attaching / detaching a monitor. Sometimes I got:
    - Boot with monitor
    - connect with VNC, see login screen
    - send Mini to sleep
    - disconnect monitor
    - wakeup Mini
    - VNC reconnects, showing grey screen
    - plug in monitor and wait until login screen appears on the monitor
    - VNC switches from grey to login screen
    The only way I can save some energy is a sheduled shutdown / restart. So headless works, but not after waking up from sleep.
    Any hint or solutions for this ?
    Thanks
    Marc

    Look in the security feature.  This is a link to the FAQ (step 6):  http://support.apple.com/kb/PH4014?viewlocale=en_US
    I had the same issue when I connected my Mac Mini to be a Media Server.
    /r
    C.

  • Problem in connectivity with database

    Hi anyone,
    I have installed Oracle-8i database and Developer-6i in Windows-95. I am facing the following problem in connectivity:
    In the connection dialogue box, I enter user/passwd as scott/tiger and host string as odbc:polite. I am getting an error message "OCA-30002 ubofscr function not supported".
    In schema builder, table1 is the default name of a new table created. On renaming the table name, I am getting the error message:
    "OBE-15467: Name already in use. Please choose another name"
    whereas no such table name exists in the database.
    If table1 is accepted as the new table name, I am encountering another error message:
    "OBE-15361: Error in creating primary/unique constraint for table1. [POL-5228] message file is not loaded".

    Please use CODE tags when posting code. You are losing some of the plus signs of string concatenation to the forum's formatting beast.
    Preferred solution: Don't use Access as a database. The JDBC-ODBC bridge is always troublesome.
    If you must use Access...
    Well the message is easy enough to understand: it can't find the database db1.mdb.
    You say you put db1.mdb in the web directory. Obviously the computer is not looking there (silly computer for not looking where you put the file)
    So it is up to you to be smart and tell the computer exactly where to go.
    Using application.getRealPath("/db1.mdb") in place of "db1.mdb" will probably work in a JSP.
    String databaseURL = accessDBURLPrefix  + application.getRealPath("/db1.mdb") +  accessDBURLSuffix;cheers,
    evnafets

  • Problem in Connecting with Ftp

    Hi all,
    While Connecting to the ftp i am getting the folloeing error.
    "An error occurred while connecting to the FTP server 'mn01crm02:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 /usr/sap/SAP MDM 5.5/Server/Distributions/D11_ORCL/ADCWECC/Inbound/SAP_ECC/NewPort2/Ready: The system cannot find the path specified. '. For details, contact your FTP server vendor."...
    Previously port was not opened now the port issue has been resolved. Please focus some light on this error. what can be the possible ways to overcome this error. Considering that i have gven user namr and password correctly (TO connect with ftp) in sender file adapter.
    Thanks
    Sachin

    Hi ,
    The  error is surely of the Path .
    Just perform the following steps.
    1. Logon to the FTP machine.
    2. Go the Folder where the FTP is configured....(d:/ smflder/ FTPFolder/ Parent Dir/ Child Dir)
    3. Now in communication channel if u have used the path say (Parent Dir/ Child Dir)
    4. Then specify the Parent folder also in the channel for e.g. (FTPFolder/ Parent Dir/ Child Dir)
    This must solve your problem
    Regards,
    Ashwin M
    Mark the helpful answer

Maybe you are looking for

  • Rebuild seems to have moved sent attachments to the Trash!

    I just rebuilt my mailboxes in OSX 10.4.3. I happened to look in my trash afterwards, and all these files have magically appeared. They are files that I had attached to outgoing mails. Correspondingly, my Mail Downloads folder is much emptier than it

  • Century gothic displays in adobe reader 8 and not in 9

    Hi I have created a pdf using adobe livecycle and i have set the address font in my header to Century Gothic. When i view the doc in Adobe reader 8, it shows it exactly the way i want. When i view it in adobe 9, it has changed to arial. Why is this h

  • IPSec secured L2TPv3 - one way traffic in L2 tunnel

    Sigh... after 7 hours battling coming here because I've exhausted all my options to find an answer for my problem. So here is the topology - standard (boring) IPSec secured L2TPv3 tunnel: on one side - 897 connected to a DSL box, on another side - 19

  • Display the login User ID on Header in Business Objects XI R3.1 Infoview

    In XI R2 Infoview- the login user ID  is displayed on header. However  In XI R3.1 infoview- displayed Business Objects Logo on the same place of the Header. We noticed that In BO XI3.1 infoview the login user ID  is displayed on header. However the B

  • IIS Error 500

    Hi All, In one of the secondary server (MP,DP installed) showing error 500. but Mpcontrol.log said 200 Ok message. Also I can browse the MP link without  any issue. I tried to restart the services but still getting error 500 in IIs. Its win2k8 server