App Engine's datastore is not an RDBMS. Check out our datastore
documentation here for a guide about how to do persistence:

http://code.google.com/appengine/docs/java/datastore/overview.html

On Wed, May 19, 2010 at 11:38 PM, bhagya laxmi
<[email protected]>wrote:

> hi
> iam very new to this google apps
> i know  how to deploy application.
>
> can you please guide me how to do jdbc part using mysql .
> i want to create database ,tables and i also want to do CURD
> operation.
> its very urgent.
> i add this code to tomact
> grant codeBase "file:${catalina.home}/webapps/-" {
>      permission java.net.SocketPermission "192.168.12.81:3306",
> "connect";
> };
>
>
> this is my code:
>
> Connection conn     = null;
> String url          = "jdbc:mysql://192.168.12.81:3306/";
> String db           = "First";
> String driver       = "com.mysql.jdbc.Driver";
> String user         = "";
> String pass         = "";
>
>
>
> try {
>    Class.forName(driver).newInstance();
> } catch (InstantiationException e) {
>        out.println(e);
>    e.printStackTrace();
> } catch (IllegalAccessException e) {
>        out.println(e);
>    e.printStackTrace();
> } catch (ClassNotFoundException e) {
>        out.println(e);
>    e.printStackTrace();
> }
> try {
>
>            conn = DriverManager.getConnection(url+db, user, pass);
>             PreparedStatement pst=conn.prepareStatement("create table
> testbhagya(name varchar(20))");
>
>            int i=pst.executeUpdate();
>            out.println("table created"+i);
>            PreparedStatement pst1=conn.prepareStatement("insert into
> testbhagya values('laxmi')");
>
>
>            int j=pst1.executeUpdate();
>            out.println("insert"+i);
>            PreparedStatement pst2=conn.prepareStatement("select *
> from tab");
>
>            ResultSet rs=pst2.executeQuery();
>            while(rs.next())
>            {
>                out.println(rs.getString(1));
>            }
>
> } catch (Exception e) {
>        out.println(e);
>            System.err.println("Mysql Connection Error: ");
>    e.printStackTrace();
> }
>
>
> i am getting error.
> what is wrong.
> Thanks and Regards
> Bhagya..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Twitter: http://twitter.com/ikai
Delicious: http://delicious.com/ikailan

----------------
Google App Engine links:
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-appengine-java?hl=en.

Reply via email to