Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JSP+SQLµÇ¼ע²áÒ³ÃæÒ»Ð©ÎÊÌâ

ÎÒµÄlogin.jsp¾ÍÊǼòµ¥µÄÏÖʵµÇÂ¼Ò³Ãæ£¬ÎÒµÄLoginGo.jspµÄ²¿·Ö´úÂëÈçÏ£º
<%@ page contentType="text/html; Charset=GB2312" language="java" import="java.sql.*,java.util.*,myPk.*"  %>
<%  Connection con;
    Statement sql;
    ResultSet rs;
    String ID,Pwd,Figure;//µÇ¼Õ˺ţ¬ÃÜÂ룬µÇ¼Éí·Ý¼¶±ð
    ID=request.getParameter("loginid");//loginidÊÇlogin.jspÖÐÕ˺ŵÄÎı¾¿òÃû×Ö
    Pwd=request.getParameter("password");//passwordÊÇlogin.jspÖÐÃÜÂëµÄÃÜÂë¿òÃû×Ö
try{
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e){
            out.print(e);
}
try
{
      con=DriverManager.getConnection("jdbc:odbc:TestScore","","");
      sql=con.createStatement();
  rs=sql.executeQuery("select * from users where ID='"+ID+"' and Pwd='"+Pwd+"'");
if(rs.next()){
  Figure=rs.getString("Figure");
  session.setAttribute("Figure",Figure);
                    if(Figure.equals("ѧÉú")){
               


Ïà¹ØÎÊ´ð£º

sqlÓï¾ä¶à±í¶à×ֶβéѯ - MS-SQL Server / »ù´¡Àà

ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд 

ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......

jspÁ´½Ósql2000µÄÒÉÎÊ£¿



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

¹ØÓÚAJAXºÍJSPµÄһЩСÎÊÌâ¡« - Java / Web ¿ª·¢

ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
  %>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......

ÇóÒ»sqlÓï¾ä - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÏÖÔÚÓÐÁ½ÕÅ±í£ºÎÄÕÂÖ÷±íA(articleId,articleTitle)£¬ÎÄÕÂÆÀÂÛ±íB(commentId,articleId,commentTitle)
ÏÖÔÚÎÒÏëʵÏÖÕâÑùµÄ¹¦ÄÜ£ºÁгöÎÄÕÂÁÐ±í£¬ÆäÖÐÿƪÎÄÕ±êÌâÏÂÃæÁгö´ËÎÄÕµÄǰ2¸öÎÄÕÂÆÀÂÛ£¬ÇëÎÊsqlÓï¾äÔõôд°¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ