求求高手了 我一天了搞不出来
就是连不上 ~~为什么
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>系统测试页</TITLE>
<BODY>
</HEAD>
<div align="center">
<%
Dim ID,mima,L1,L2,sSQL,s,rst
dim cnnID=Trim(Request.Form("ID"))
mima=Trim(Request.Form("password"))
set cnn=server.CreateObject("ADODB.Connection")
set rst=server.CreateObject("ADODB.Recordset")L1="123"
L2="123"
<p FONT COLOR="red">用名错误 </p>
cnn.ConnectionString="PROVIDER=SQLOLEDB;DATA SOURCE=Local Server;"& _ "UID=sa;pwd="";DATABASE=A911"
sSQL="SELECT * FROM fei3 WHERE ID1='123'AND pass='123'"
cnn.open
set rst=cnn.Execute(sSQL, ,adCmdtext)
if rst.EOF THEN
<p FONT COLOR="red">用名错误</p>
Response.End()
Else
Response.Write"<p ALIGN =cnter><b>sssss</b></p>end ifSet Rs=Nothing
Set DBConn=Nothing
%>
<table width="998" height="574" border="1">
<tr>
<td width="75" height="431" rowspan="2"> </td>
<td width="907" height="114">
</td>
</tr>
<tr>
<td valign="top"><p><a href="WebForm11.aspx">信息管理</a> </p>
<p><a href="WebForm11.aspx">用户管理 </a></p>
<p><a href="WebForm11.aspx">企业管理</a></p>
<p> </p>
<p> </p></td>
</tr>
</table>
</div>
</BODY>
</HTML>
就是连不上 ~~为什么
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>系统测试页</TITLE>
<BODY>
</HEAD>
<div align="center">
<%
Dim ID,mima,L1,L2,sSQL,s,rst
dim cnnID=Trim(Request.Form("ID"))
mima=Trim(Request.Form("password"))
set cnn=server.CreateObject("ADODB.Connection")
set rst=server.CreateObject("ADODB.Recordset")L1="123"
L2="123"
<p FONT COLOR="red">用名错误 </p>
cnn.ConnectionString="PROVIDER=SQLOLEDB;DATA SOURCE=Local Server;"& _ "UID=sa;pwd="";DATABASE=A911"
sSQL="SELECT * FROM fei3 WHERE ID1='123'AND pass='123'"
cnn.open
set rst=cnn.Execute(sSQL, ,adCmdtext)
if rst.EOF THEN
<p FONT COLOR="red">用名错误</p>
Response.End()
Else
Response.Write"<p ALIGN =cnter><b>sssss</b></p>end ifSet Rs=Nothing
Set DBConn=Nothing
%>
<table width="998" height="574" border="1">
<tr>
<td width="75" height="431" rowspan="2"> </td>
<td width="907" height="114">
</td>
</tr>
<tr>
<td valign="top"><p><a href="WebForm11.aspx">信息管理</a> </p>
<p><a href="WebForm11.aspx">用户管理 </a></p>
<p><a href="WebForm11.aspx">企业管理</a></p>
<p> </p>
<p> </p></td>
</tr>
</table>
</div>
</BODY>
</HTML>
string strCmd = "SELECT Territorycode,Employeecode FROM retail_emp_territory";
SqlConnection conn = new SqlConnection(strConn);
SqlDataAdapter dr = new SqlDataAdapter(strCmd,conn);
DataSet ds = new DataSet();dr.Fill(ds);
??
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>系统测试页</TITLE>
<BODY>
</HEAD>
<div align="center">
<%
Dim ID,mima,L1,L2,sSQL,s,rst
dim cnnID=Trim(Request.Form("ID"))
mima=Trim(Request.Form("password"))
set cnn=server.CreateObject("ADODB.Connection")
set rst=server.CreateObject("ADODB.Recordset")L1="123"
L2="123" SqlConnection myConnection;
myConnection=new SqlConnection("server=localhost; database=A911;user id=sa;password=") ;
SqlDataAdapter x1=new SqlDataAdapter("select * from fei3 where ID1=@city and pass=@tocity ",myConnection);
x1.SelectCommand.Parameters.Add(new SqlParameter("@city",SqlDbType.NChar,20));
x1.SelectCommand.Parameters.Add(new SqlParameter("@tocity",SqlDbType.NChar,20));
x1.SelectCommand.Parameters["@city"].Value="123";
x1.SelectCommand.Parameters["@tocity"].Value="gfgfdgf";
DataSet ds = new DataSet();
x1.Fill(ds,"fei3");
DataTable dt= new DataTable();
DataRow[] dr=new DataRow[5];
dt=ds.Tables["fei3"];
dr=dt.Select();
try
{
Label2.Text=dr[0]["ID1"].ToString();
Label1.Text=dr[0]["pass"].ToString();
}
catch
{
Response.Redirect("WebForm11.aspx?");
}if rst.EOF THEN
<p FONT COLOR="red">用名错误</p>
Response.End()
Else
Response.Write"<p ALIGN =cnter><b>sssss</b></p>end ifSet Rs=Nothing
Set DBConn=Nothing
%>
<table width="998" height="574" border="1">
<tr>
<td width="75" height="431" rowspan="2"> </td>
<td width="907" height="114">
</td>
</tr>
<tr>
<td valign="top"><p><a href="WebForm11.aspx">信息管理</a> </p>
<p><a href="WebForm11.aspx">用户管理 </a></p>
<p><a href="WebForm11.aspx">企业管理</a></p>
<p> </p>
<p> </p></td>
</tr>
</table>
</div>
</BODY>
</HTML>