Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2002): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2) in /home/itprojectsco/public_html/includes/database.php on line 13
Ready Project |BCA Project | MCA Project | BBA Project | MBA Project |INDIA'S BIGGEST COLLEGE PROJECT STORE
import java.io.*;
class Slip15
{
public static void main(String args [])
{
connection con;
statement stmt;
PreparedStatement ps;
String name;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:lab:dsn");
stmt=con.prepareStatement(query);
BufferdReader br=new BufferdReder(new InputStermReader(System.in));
System.out.println( " enter customer name for upadte");
name=br.readline();
System.out.println("enter new address");
String addr=br.redLine();
ps.setString(1,addr);
ps.setString(2,aname);
int no=ps.executeUpdate();
if(no==0)
{
System.out.println("not updated in table.....");
System.out.println("name not match"+name);
}
else
{
System.out.println("Successfully updated in table ");
ps=con.prepareStatement("select * from customer where name=?");
ps.getString(1,name);
ResultSet rs=ps.executeQuery();
System.out.println();
System.out.println("cid\t"+"name\t"+"address\t"+"ph-no");
System.out.println("\n""+rs.getInt(1)+"\t"+rs.getString(2)+"\t"++rs.getString(3)"\t+getSting(4));
}
}
con.close();
}
catch(Exeception e)
{
System.out.println(e);
}
}
}

Search

Project Categories


    Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/itprojectsco/public_html/includes/sidebar.php on line 30

    Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/itprojectsco/public_html/includes/sidebar.php on line 32

Recent Posts


Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/itprojectsco/public_html/includes/widget.php on line 5

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home/itprojectsco/public_html/includes/widget.php on line 7

Sign In