yegane8
شنبه 13 خرداد 1391, 23:24 عصر
سلام
من باید چه تغییری در کد زیر انجام بدم تا کاربر valueها را وارد کند
import java.sql.*;
public class Insert
{
private static Connection link;
private static Statement statement;
public static void main(String[] args) throws ClassNotFoundException, SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
link = DriverManager.getConnection("jdbc:odbc:Students","","");
statement = link.createStatement();
statement.executeUpdate("INSERT INTO Identify"+ " VALUES (878777,'ahmad','ahmadi',0)");
link.close();
System.out.println("Your record insert successfully");
}
}
من باید چه تغییری در کد زیر انجام بدم تا کاربر valueها را وارد کند
import java.sql.*;
public class Insert
{
private static Connection link;
private static Statement statement;
public static void main(String[] args) throws ClassNotFoundException, SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
link = DriverManager.getConnection("jdbc:odbc:Students","","");
statement = link.createStatement();
statement.executeUpdate("INSERT INTO Identify"+ " VALUES (878777,'ahmad','ahmadi',0)");
link.close();
System.out.println("Your record insert successfully");
}
}