DIGIT-ARC read-only archive · snapshot: July 23, 2026

Need Help in NetBeans connectivity with MSAccess 2003 !!!! urgently

2 posts · originally from https://geek.digit.in/community/threads/need-help-in-netbeans-connectivity-with-msaccess-2003-urgently.125389/

047
047 Original post #1
Mar 27, 2010 at 11:59 PM
Hi guys...

can anyone please help me in NetBeans 6.8 connecting with MSAccess 2003?

i m using following code to setup a connection...

"
public static void main(String args[])
{
String myDriverName="sun.jdbc.odbc.JdbcOdbcDriver";
String url="jdbc: odbc:samdatabase";

try
{
Class.forName(myDriverName);
}

catch(ClassNotFoundException e)
{
System.err.println("Class not found");
return;
}

try
{
Connection con=DriverManager.getConnection(url);
System.out.println("Connection established successfully");
}

catch(Exception e)
{
System.err.println("Connection did not establish successfully");
}
}

"


please help me out in connecting to MSAccess......

one more thing....if i want to use this in a swing form..how to display an error message to the user?
like we do in Visual Studio 2005 using "messageBox()". is there anything which can display messagebox in netbeans 6.8.....
047
047 #2
Mar 29, 2010 at 7:16 PM
Hey, please reply.....Its urgent......