Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

about jdbc connectivity

hello all group memebrs

sir i m new comer on java

i have done core java but i have some problems in making connection to Ms-Access in Window xp
i m using java 2
but during compile time it is giving some assert error
why it is happening
the code below i have used
<code>
import java.sql.*;
import javax.swing.*;

class makecon
{
public void connect()throws ClassNotFoundException,SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:myds";
String user="Admin";
String ps="";
Connection cn=DriverManager.getConnection(url,user,ps);
}

}
class test1
{
public static void main(String args[])
{
makecon con=new makecon();
con.connect();
}
}
</code>
plz do me favour
thanx
from
deepak metha
[879 byte] By [deepakkrmehta] at [2007-11-11 9:52:40]
# 1 Re: about jdbc connectivity
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2
http://blog.taragana.com/index.php/archive/how-to-access-ms-access-database-from-jdbc/
kks_krishna at 2007-11-11 22:32:18 >