Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC Not get ans properly
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Abhijeet
Not get ans properly
3 Answer(s)      3 years and 4 months ago
Posted in : JDBC


I create db on my system using MS-acess,then I create DSN for program but I still not get answer It throws an Exception "java.lang.classNotFoundException",what is this I don't get plz help me.


Advertisement
View Answers

September 6, 2011 at 11:05 AM


Create DSN connection:

1. Open Data Sources (Start->Control Panel->Administrative Tool->Data Sources(ODBC)
2. Open User DSN tab
3. Add a user DSN
4. Select Microsoft Access Driver(*.mdb)
5. Select database name and Create the DSN name (e.g emp)
6. Click "Ok" and then compile the following java code.

import java.sql.*;

public class CreateTable {
  public static void main(String[] args) throws Exception {
    Connection conn = DriverManager.getConnection("jdbc:odbc:student");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Statement st = conn.createStatement();
    st.executeUpdate("create table employee (empid int,empname varchar(30));");
    System.out.println("Table is created successfully!");
    st.executeUpdate("insert into employee (empid,empname ) values (1,'Roseindia')");
    System.out.println("Data is inserted successfully!");
    st.close();
    conn.close();
  }
}


September 10, 2011 at 1:04 PM


Yes sir I have done it & it compiled properly but when i run it Eception is come(java.lang.ClassNotFoundException:jdbc.odbc.JdbcOdbcDriver) what is this?I dont get plz tell me.



September 11, 2011 at 6:41 PM


Yes sir i got answer thank u very much



Related Tutorials/Questions & Answers:
Not get ans properly
Not get ans properly  I create db on my system using MS-acess,then I create DSN for program but I still not get answer It throws an Exception "java.lang.classNotFoundException",what is this I don't get plz help me.   
how to display jsp page containing mysql query in particular division using ajax ?my code is below bt i cundt get it properly
ajax ?my code is below bt i cundt get it properly   index.html <...; } } } request.open("GET", "newjsp.jsp", true); // Create a function...; } } } request.open("GET", "newjsp.jsp", true
Advertisements
implement internationlism in Flemish ans Spanish using Sturts1.1
implement internationlism in Flemish ans Spanish using Sturts1.1  HI - we are using struts1.1, we have a requirement to implement internationlism in Flemish ans Spanish. Will this be supported in Struts1.1? How to resolve
Why are my variables not dividing properly?
Why are my variables not dividing properly?  Why are my variables not dividing properly
need to ans abt db - JSP-Servlet
need to ans abt db  helllo can you tell me m just starting to knowing abt servlet and i trying to making e-mail site so can you tell me with the java servlet wht is the backhand database to use to proper with that site
output not coming properly - JSP-Servlet
output not coming properly  I am not getting the output properly when i had written my code like below: Add Employee Details for( j=0;j<11;j++) { out.println("Department code
having problem with menu ans sub menu items css ...plz help!!
having problem with menu ans sub menu items css ...plz help!!  PLZ help ...this is my html menu > <div id="content"> <div > class="navigation" id="nav"> > <div class="item user"> >
get
get ( ) Method in PHP  what is get method in PHP   Please visit the following link: http://www.roseindia.net/php/php-Get-Post.shtml
servlet not working properly ...pls help me out....its really urgent
servlet not working properly ...pls help me out....its really urgent  Hi, Below is the front page of my project 1)enty.jsp </form> <...;html> <body> > > <form method="post" action="get"> >
Button text is not displaying properly in jre 1.6.0_22 when html tags are used in the textstring
Button text is not displaying properly in jre 1.6.0_22 when html tags are used in the textstring  using html string to jbutton text is not working in Java 1.6.0_22 when browser is using the existing java console this.setText
This Query is no working in sql developer it is giving Ora-0933 exception SQL command not properly ended exception
This Query is no working in sql developer it is giving Ora-0933 exception SQL command not properly ended exception  SELECT * from employees ORDER BY first_name limit 0,10;   Hi Friend, Please clarify your problem
get and post
get and post  what is php and get   PHP get and post method
get method
get method   how to use get method: secure method is post method and most of use post method why use a get method
post get
post get  what is post and get
i have split a string by space ,done some operation and now how to properly order them for sending a mail in java or jsp - JSP-Servlet
i have split a string by space ,done some operation and now how to properly... that is not properly ordered i.e see the following ///I typed a matter like this in a text... for this month is 10000 .Thanks and Regards Hr . So how to properly set
get Blob
get Blob   how i can display a Blob in XHTML (i developpe with hbernate
POST or GET
POST or GET  hello, Which will execute faster on php POST or GET?   hii, The POST metod is much more faster then GET ..because in GET... to ULR that's why POST is faster then GET method
get absolute time java
get absolute time java  How to get absolute time in java
Get the error messages displayed
Get the error messages displayed  How to get the error messages displayed
Requirements for JSF to get started
Requirements for JSF to get started  What are the requirements for JSF to get started
advantages of get method?
advantages of get method?  php in what is advatages of get methods and how you can use get methods
Hibernate get
In this section, you will learn about get method of Hibernate
property in javascript get set
property in javascript get set  How to create the get and set property in JavaScript?   Creating Get and Set properties in JavaScript example.. myVar Sample = { nval : "", get get() { return this.nval; }, set
post ,get data in the database
post ,get data in the database  post ,get data in the database  Please visit the following links: PHP get post data PHP Tutorials
Get Image
Get Image       This Example shows you get the image. Description of the code...; is set to true.getDefaultToolkit is used for get the default toolkit
Get GMT from IP
Get GMT from IP  How do I get GMT value from IP address?? Thanx in Adv
 

 

 

DMCA.com