473,668 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why am I getting a n exception with these codes?

108 New Member
public static void test_conn(){
try
{
// Step 1: Load the JDBC driver.
Class.forName(" sun.jdbc.odbc.J dbcOdbcDriver") ;

// Step 2: Establish the connection to the database.
String url = "jdbc:odbc: MS Access Database";
Connection conn = DriverManager.g etConnection(ur l);
System.out.prin tln("connection login timeout "+DriverManager .getLoginTimeou t());


}
catch (Exception e)
{
System.err.prin tln("Got an exception! ");
System.err.prin tln(e.getMessag e());
}

}



When I run these codes i get the following exception :


"Got an exception!
No data found"

I doubt there is a problem with my url..I've used the Ms access datasource and I want to connect to a database named test.mdb...

How can I achieve this ?


Thabks in adv
Jul 16 '10 #1
0 959

Sign in to post your reply or Sign up for a free account.

Similar topics

2
55583
by: Eirik M. | last post by:
Hi, I've got the following piece of code that's causing me a bit of a problem XmlDocument doc = new XmlDocument (); XmlNode rootNode = doc.CreateNode (XmlNodeType.Element, "usersettings", null); User user = new User (userid); XmlNode rolesNode = user.GetRoles (); rootNode.AppendChild (rolesNode);
1
1126
by: Frank Rizzo | last post by:
When I run my app in the IDE, dumping exception.ToString() information to file usually gives me a very trace on what happened including line numbers, which is really useful. When I run the app outside the IDE (even though compiled for Debug), the exception.ToString() doesn't seem to contain the line numbers where the errors have occured. Is this by design? Is there a way to get line numbers back? Am I missing something simple?
0
1562
by: Chris Morse | last post by:
Hi, I am creating a solution with two projects. Basically, they share a few common class files and forms. I finished one project, and it compiles and runs fine. I just finished bringing in the second project, and I get the following error on one of the forms when it is invoked: ----------------------------------------------------------------- An unhandled exception of type
0
1073
by: Alvin A. Delagon | last post by:
I'm writing a simple python code that will upload files onto a ftp server. Everything's fine and working great except that the script I wrote don't know is an upload is successful or not. Is there a way to obtain the ftp status codes with this module? Thanks in advance!
3
4067
by: Rahul Anand | last post by:
As per our requirements we have a web service which internally connects (Simple HTTP Post Request) to a remote server to initiate some work. We are calling the web service method asynchronously from a .NET Web Application hosted on IIS. In our setup the web request form a client can be running for long duration (may be more than 4 hours). We are getting exceptions during the HTTP send/receive inside the web service method. The exception...
4
2138
by: Hatter | last post by:
I wrote these codes: function aaa() { } aaa.nnnn = "now is aaa"; alert(aaa.nnnn); eval("func = " + aaa.toString()); alert(aaa.nnnn);
1
11206
by: jyoti202 | last post by:
Hi, Need help for this as i have been looking for it but could not get any results. We are using java as front end and DB2 as backend, i m getting the exception while executing a particular query with following error description: DB2 SQL error: SQLCODE: -901, SQLSTATE: 58004, SQLERRMC: sqlno_itr_plan::next :rc( 0) SQLCODE: -901 this error code says "Non severe System error" This query was working fine till...
6
1817
by: DAnDA | last post by:
i want to create a dll file and put below codes within public OrdersItem OrdersItem { get; set; } public List<OrdersItem> OrdersList { get; set; } public DataSet GetDataSet(string Column, string Value); public DataTable GetDataTable(); public DataTable GetDataTable(int NumRows, bool FromEnd); public DataTable GetDataTable(int FirstRow, int LastRow); public DataTable...
6
1728
by: ET | last post by:
Dear All, I have once made a mdb file using access 2000 under Windows 2000. I didn't use it for long. Today I tried but some codes just didn't work. I am using Access 2002 and Windows XP. I have absolutely no idea what's going on. These are the problematic codes, thank you very much for your kind suggestion and help. Paul From Bratislava, Slovakia -------------------------------------------
0
1202
by: akash | last post by:
Hi, I've got some C# code instantiating a managed C++ class which in turn instantiates an unmanaged C++ class. I'm getting intermittent exceptions caught by my C# code, but the I can't get any details of the root cause. The info I have is: System.Runtime.InteropServices.SEHException was unhandled by user code ErrorCode=-2147467259 Message="External component has thrown an exception."
0
8371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8652
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2782
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.