473,385 Members | 1,973 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,385 software developers and data experts.

how to integrate ms access and mysql together

46
hai,

i have one problem to integrate ms access and mysql together using jsp.my error is it can not find the driver for mysql..here is my code

Expand|Select|Wrap|Line Numbers
  1. <%@ page import="java.sql.*" %>
  2.  
  3. <%
  4.    Connection odbcconn = null;
  5.    Connection jdbcconn = null;
  6.    PreparedStatement readsms = null;
  7.    PreparedStatement updsms = null;
  8.    ResultSet rsread = null;
  9.  
  10.    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//load database driver
  11.    odbcconn = DriverManager.getConnection("jdbc:odbc:SMS");//connect to database
  12.    readsms = odbcconn.prepareStatement("select * from inbox where Status='New'");
  13.    rsread = readsms.executeQuery();
  14.    while(rsread.next()){
  15.         Class.forName("com.mysql.jdbc.Driver");
  16.         jdbcconn = DriverManager.getConnection("jdbc:mysql://localhost:3306/bakme", "root", "");//connect to database
  17.         updsms = jdbcconn.prepareStatement("insert into inbox(sms,phone) values (?,?)");
  18.         updsms.setString(1, rsread.getString("Message"));
  19.         updsms.setString(2, rsread.getString("Phone"));
  20.         updsms.executeUpdate();
  21.    }
  22.  
  23. %>
Jan 8 '10 #1

✓ answered by najmi

i have solved this problem by adding driver in library

1 2513
najmi
46
i have solved this problem by adding driver in library
Jan 8 '10 #2

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

Similar topics

10
by: Jo | last post by:
Hello I am a web designer who is slowly trying to learn more about web development. I have a client who would like to drive their website using a database so I am now in the perfect situation...
2
by: Jay Moore | last post by:
Greetings, all! I have a project for work, and I'm not sure how to efficiently do what I need to do. I'm hoping someone out there can help. Project is this: I'm creating a web-based...
35
by: Swartz | last post by:
Hi all. I'm working here on a small project of mine. I'm not new to programming, but I'm new to PHP. You have to understand that I'm coming from C++, OOP world, so my code might seems a little...
1
by: Paradigm | last post by:
Does anyone know how I can use vba in access to run a script that is stored as a file. I can make a connection to mysql database and run sql statements but this sql statement is very long (creates...
17
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I...
1
by: bettina | last post by:
I have exported my old Access database to MySQL. I am used to using the possibilities of Access to retrieve, for example, for a definite column, the values in a column of another table (through a...
5
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
3
by: gggram2000 | last post by:
Hi, I'm a newbie on this so I would like to know in simple terms how I can integrate my version PHP with mysql...Any help would be greatly appreciated
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.