Do you honestly expect your web browser to directly talk to your MySQL 
database?
See 
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsClient.html 
(first 
paragraph, last sentence)

On Friday, March 16, 2012 10:27:00 AM UTC+1, vijay wrote:
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/D3bsU6lB350J.
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.

Reply via email to