This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Server configuration denies access to data source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Server configuration denies access to data source" Watch "Server configuration denies access to data source" New topic
Author

Server configuration denies access to data source

rahul soni
Greenhorn

Joined: Aug 22, 2005
Posts: 24
I written connection code but it thorw "Server configuration denies access to data source" this exp
my code is(help me)

import java.sql.*;
import javax.sql.*;
public class Mycon
{

public static void main(String args[])
{Connection con;
Statement st;
ResultSet rs;
try
{
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Class.forName("org.gjt.mm.mysql.Driver");
System.out.print("CON");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/pune","Rahul","pratik");
st = con.createStatement();//createStatement()
rs=st.executeQuery("select * from Author");
while(rs.next())
{System.out.print(rs.getString(1));}
}catch(Exception e){System.out.print(e.getMessage());}
}
}
 
 
subject: Server configuration denies access to data source
 
Similar Threads
Reading an Excel file using Java
java.sql.SQLException: Server configuration denies access to data source
JDBC connectivity problem through JSP
Errow when connecting JSP to MySQL
File Dsn Problem?