My code is this fo login given below. but when i press go button then this error is comming.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not use ''; file already in use.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
code here
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@ Page Language="C#" Debug="true" %>
<script runat="server">
OleDbConnection con;
OleDbCommand cmd,cmd1;
OleDbDataAdapter da,da1;
DataSet ds,ds1;
void Page_Load(Object s, EventArgs e)
{
Session["s"]=TextBox1.Text;
con=new OleDbConnection();
con.ConnectionString="PROVIDER=Microsoft.Jet.OleDb.4.0;Data Source=" + Server.MapPath("~/cvbank.mdb") + "";
con.Open();
ds= new DataSet();
string sql="select * from cv";
da=new OleDbDataAdapter(sql,con);
da.Fill(ds,"cv");
con.Close();
}void go(Object s, EventArgs e)
{string sa=TextBox1.Text.Trim();
string pw=TextBox2.Text.Trim();
con.Open();
int r=0,r1=0;
DataRow []rs;
DataRow []rs1;
rs=ds.Tables["cv"].Select("email='"+sa+"'");
r=rs.Length;
rs1=ds.Tables["cv"].Select("pass='"+pw+"'");
r1=rs1.Length;
if(r>0 && r1>0)
{Response.Redirect("account.aspx");
}else
{System.Web.UI.WebControls.Label lbl1=new System.Web.UI.WebControls.Label();
lbl1.ForeColor=System.Drawing.Color.Yellow;
lbl1.BackColor=System.Drawing.Color.Blue;
lbl1.Text="please enter a valid user id and password";
ph1.Controls.Add(lbl1);
}con.Close();
}void click(Object s, EventArgs e)
{Response.Redirect("cv_posting.aspx");
}
</script>