用javac编译程序的时候出现不能识别SQLProxy代码的问题是怎么回事
问题如题,请高人帮忙看看,我把源程序也贴出来
package ch12; import java.sql.*; public class loginUser
{
private boolean isMember;
private boolean checked;
private String id="";
private String password="";
public SQLProxy sqlProxy; public loginUser()
{
}
public void setId(String id)
{
isMember=false;
checked=false;
this.id=id;
}
public String getId()
{
return this.id;
}
public void setPassword(String password)
{
isMember=false;
checked=false;
this.password=password;
}
public String getPassword()
{
return this.password;
}
public void setSqlProxy(SQLProxy sqlProxy)
{
isMember=false;
checked=false;
this.sqlProxy=sqlPorxy;
}
public boolean isAdminUser()throws SQLException
{
this.isMember=false;
try
{
sqlProxy.execSQL("select password form users where del='n' and id='" +this.id+"'"+"and type='s'");
if (sqlProxy.nextRow()&&sqlProxy.getFieldSting("password").equals(password)) this.isMember=true; }
catch(SQLException sqlex)
{
checked=false;
throw sqlex;
}
return this.isMember;
}
public boolean isMember()throws SQLException
{
this.isMember=false;
try{
sqlProxy.execSQL("select password form users where type='u'and del='n'and id='"+this.id+"'");
if(sqlProxy.nextRow()&&sqlProxy.getFieldString("password").equals(password)) this.isMember=true; }
catch(SQLException sqlex)
{
checked=false;
throw sqlex;
}
return this.isMember;
}
}
问题如题,请高人帮忙看看,我把源程序也贴出来
package ch12; import java.sql.*; public class loginUser
{
private boolean isMember;
private boolean checked;
private String id="";
private String password="";
public SQLProxy sqlProxy; public loginUser()
{
}
public void setId(String id)
{
isMember=false;
checked=false;
this.id=id;
}
public String getId()
{
return this.id;
}
public void setPassword(String password)
{
isMember=false;
checked=false;
this.password=password;
}
public String getPassword()
{
return this.password;
}
public void setSqlProxy(SQLProxy sqlProxy)
{
isMember=false;
checked=false;
this.sqlProxy=sqlPorxy;
}
public boolean isAdminUser()throws SQLException
{
this.isMember=false;
try
{
sqlProxy.execSQL("select password form users where del='n' and id='" +this.id+"'"+"and type='s'");
if (sqlProxy.nextRow()&&sqlProxy.getFieldSting("password").equals(password)) this.isMember=true; }
catch(SQLException sqlex)
{
checked=false;
throw sqlex;
}
return this.isMember;
}
public boolean isMember()throws SQLException
{
this.isMember=false;
try{
sqlProxy.execSQL("select password form users where type='u'and del='n'and id='"+this.id+"'");
if(sqlProxy.nextRow()&&sqlProxy.getFieldString("password").equals(password)) this.isMember=true; }
catch(SQLException sqlex)
{
checked=false;
throw sqlex;
}
return this.isMember;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货