473,394 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Error:java.sql.SQLException: Data source name not found

error:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
above error is shown,

i have used oracle10g as database

my code:
Expand|Select|Wrap|Line Numbers
  1. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  2.  
  3.          Connection con=DriverManager.getConnection("jdbc:odbc:XE","SYSTEM","system");
  4.  
  5.  
  6.                         Statement st=con.createStatement();
  7.      ResultSet rs=st.executeQuery("select * from result");
Nov 14 '11 #1
1 1956
after creating DSN test your connection first then compile your code and run.
Dec 19 '11 #2

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

Similar topics

0
by: Nick Poulis | last post by:
Hi to all I face the following problem, the following code (very simple) is contained in a referenced class method Dim cn As New OdbcConnection("DSN=BOC;UID=Admin;PWD=;") cn.Open()
4
by: smcdanie | last post by:
When trying to view an asp page on my Windows 03 server, I get the following error message: Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no...
0
by: Luca | last post by:
Hello to all, I have a problem during connection to mysql through oledb provider. I use Microsoft Visual C++ with MFC on Windows and I try to connect to mysql with the following call: hResult =...
12
by: bhanu08 | last post by:
I am get this error java.sql.SQLException: Data source name not found and no default driver specified my code for connection is { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");...
1
by: Gourisankar | last post by:
Hi, I am using a VB6 application. While I am trying to access Sybase Database stored procedure through DSR, It is giving the error "Data source name not found or Default driver is not specified" ....
5
by: Darshini | last post by:
Hi When ever opening my asp pages im getting this error..plz give some solution Data source name not found and no default driver specified
1
by: harsha1302 | last post by:
Hi all i am trying to connect my application written in jsp to the database and i am receiving this exception java.sql.SQLException: Data source name not found and no default driver specified...
1
by: Darpana | last post by:
exp=java.sql.SQLException: Data source name not found occurs when servlet run using tomcat5.5 please give me solution
4
by: santhanalakshmi | last post by:
Hi, In ODBC, i given data source name and the test connection is also successful. But i don't know, why i am facing this error DBI connect('wwwdsn','webid',...) failed: Data...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.