package conn.client;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.dev.generator.ast.Statement;
public class login implements EntryPoint {
public void onModuleLoad() {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/demo","root","myPassword");
Statement st=(Statement)
conn.createStatement();
ResultSet rs=((java.sql.Statement)
st).executeQuery("select *
from login");
ResultSet result=((PreparedStatement)
st).executeQuery();
Window.alert(result.getString(1));
}
catch(Exception ex)
{
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.