1. Check out our companion app, Forums for Android! Download from Google Play

selected spinner value is updated in mysql db via soap webservice in android

Discussion in 'Application Development' started by krishnaveni, Aug 24, 2012.

  1. krishnaveni

    krishnaveni Well-Known Member
    Thread Starter
    55

    Dec 16, 2011
    158
    0
    55
    chennai
    hi i got the solution for selected spinner item is inserted in mysql database through calling soap webservice..thanks for giving nice ideas.but i can't develop update spinner value is save in mysql database.please refer my android code:http://pastie.org/4578986

    webservice code :http://pastie.org/4578991...the above both link for inserting code for both android and webservices....please help me...what line is change for update spinner value also change in mysql database....

    Code (Text):
    1. package com.xcart;
    2.  
    3.  
    4.  
    5. import java.sql.Connection;
    6.     import java.sql.DriverManager;
    7.     import java.sql.PreparedStatement;
    8.      
    9.     public class update {
    10.      
    11.      public String insertData(String status,String username){
    12.        
    13.       try{
    14.        
    15.        Class.forName("com.mysql.jdbc.Driver");
    16.        Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/androidlogin","root","");
    17.        PreparedStatement statement =  con.prepareStatement("UPDATE `user` set `status` = 'C'  where `status` = 'Q'");
    18.        int result = statement.executeUpdate();
    19.       }
    20.        
    21.        catch(Exception exc){
    22.         System.out.println(exc.getMessage());
    23.         }
    24.      
    25.       return "Updation successfull!!";
    26.       }
    27.      
    28.     }
    29.  
    30.  
    please help me how is wrote android code for this update function...
     

    Advertisement

Share This Page

Loading...