这个是注册的beans
package my;
import java.sql.*;
public class Register
{String logname="",
password="",
sex="",age="",
email="",
phone="",
address="",
message="";
String backNews;
Connection con;
Statement sql;
ResultSet rs;
public Register()
{try{Class.forName("sun.jdbc.odbc.jdbcodbcDriver");}
catch(ClassNotFoundException e){}
}
public void setLogname(String name)
{logname=name;
}
public String getLogname()
{return logname;
}
public void setAge(String n)
{age=n;
}
public String getAge()
{return age;
}
public void setSex(String s)
{sex=s;
}
public String getSex()
{return sex;
}
public void setPassword(String pw)
{password=pw;
}
public String getPassword()
{return password;
}
public void setEmail(String em)
{email=em;
}
public String getEmail()
{return email;
}
public void setPhone(String ph)
{phone=ph;
}
public String getPhone()
{return phone;
}
public void setAddress(String ad)
{address=ad;
}
public String getAddress()
{return address;
}
public String getMessage()
{return message;
}
public void setMessage(String m)
{message=m;
}
public String getBackNews()
{return backNews;
}
public void setBackNews(String s)
{backNews=s;
}
public void addItem()
{try{
Connection con=DriverManager.getConnection("jdbc:odbc:friend","","");
sql=con.createStatement();
if(phone.length()==0)
{phone="wu";
}
if(email.length()==0)
{email="wu"; }
if(address.length()==0)
{address="wu"; }
if(message.length()==0)
{message="wu"; }
String s=
"'"+logname+"'"+","+"'"+password+"'"+","+"'"+sex+"'"+","+
"'"+age+"'"+","+"'"+phone+"'"+","+"'"+email+"'"+","+
"'"+address+"'"+"'"+"'"+message+"'";
String condition="INSERT INTO member VALUES"+"("+S+")";
sql.executeUpdate(condition);
backNews="zhuce chenggong";
con.close();
}
catch(SQLException e)
{backNews="ni hai mei zhu ce ,qi huan mingzi ";
}
}
}
但是编译不行啊,说是String condition="INSERT INTO member VALUES"+"("+S+")"; 找不到符号
这是什么原因啊,帮我看看啊
留言板注册程序出错