Hey...
I have work on crystal report and ms access.. my application work properly 2days before but now it's not work...
i can't get what is a problem.. my site just under waiting mode.. it's not through any error...here i paste my code.. if u got any error please tell me
my online example:college.vnsguexam.org
mycode is:
public
partial class _Default : System.Web.UI.
Page
{
OleDbConnection conn = new OleDbConnection(ConfigurationManager.ConnectionStrings["SGUConn"].ConnectionString);
ReportDocument dc = new ReportDocument();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
reportconnection();
lblmsg.Text = "Hello";
}
public void reportconnection()
{
string sql = string.Empty;
sql = "select * from bba35 where seat_no=10";// order by seat_no";
ConnectionInfo ConnInfo = new ConnectionInfo();
ConnInfo.DatabaseName = "UNI.mdb";
ConnInfo.IntegratedSecurity = true;
int i = -1;
try
{
OleDbDataAdapter da = new OleDbDataAdapter();
conn.Open();
da = new OleDbDataAdapter(sql, conn);
i = da.Fill(ds, tablename);
if (i == 0)
{
lblmsg.Text = "record not found...!!";
}
else
{
dc.Load(Server.MapPath("cr1.rpt"));
dc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = dc;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
conn.Close();
}
}
catch (Exception ex)
{
lblmsg.Text = "Result not updated...please wait...!!" + ex.Message;
}
finally {
conn.Close();
}
}
public void Page_UnLoad(object sender, EventArgs e)
{
dc.Close();
dc.Dispose();
}
}
my connectionstring in webconfig is
::
<connectionStrings>
<add name="SGUConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\uni.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
please help me out... i can't find the error