Note that there are some explanatory texts on larger screens.

plurals
  1. POChanged database from SQL Server 2005 to SQL Server 2008
    primarykey
    data
    text
    <p>I changed my database from SQL Server 2005 to SQL Server 2008 and now I'm having this error message. The site was working perfectly before changing the database</p> <pre><code>Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0116: A namespace cannot directly contain members such as fields or methods Source Error: Line 1: App_Web_clientusing System; Line 2: using System.Collections; Line 3: using System.Configuration; Source File: Default.aspx.cs Line: 1 </code></pre> <p>Thanks</p> <p>EDIT</p> <pre><code>Default.aspx.cs App_Web_clientusing System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using SubSonic.Generated; using SubSonic; using HrcaPortal; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DisablePageCaching(); } protected override void OnPreRender(EventArgs e) { int pageId = 0; int.TryParse(Request.QueryString["pageId"], out pageId); if (pageId &gt; 0) { DataSet ds = HRCAWS.Admin.Misc.GetCommonPageContent(5); if (ds.Tables.Count &gt; 0) { if (ds.Tables[0].Rows.Count &gt; 0) { DataTable dt = ds.Tables[0]; if (!dt.Rows[0].IsNull(0)) { if (Convert.ToInt32(dt.Rows[0]["specialpageid"]) == pageId) Response.Redirect("SendInquiryForPdSubs.aspx", true); } } } PortalContentPage page = new PortalContentPage(pageId); //DataSet ds = PortalContentController.GetPortalMenuDS(); //if (ds.Tables.Count &gt; 0) //{ // if (ds.Tables[0].Rows.Count &gt; 0) // { // DataTable dt = ds.Tables[0]; // DataRow[] dra = dt.Select("pageId = " + pageId); // if (dra.Length &gt; 0) // { ContentPane.InnerHtml = "&lt;h1 id='title'&gt;" + page.Title + "&lt;/h1&gt;"; //use unescape as a decoding facility if you have used javascript string escape function to encode the html ContentPane.InnerHtml += Microsoft.JScript.GlobalObject.unescape(page.Content); // } // } //} } else { DataSet ds = HRCAWS.Admin.Misc.GetCommonPageContent(4); if (ds.Tables.Count &gt; 0) { if (ds.Tables[0].Rows.Count &gt; 0) { DataTable dt = ds.Tables[0]; ContentPane.InnerHtml = "&lt;h1 id='title'&gt;" + dt.Rows[0]["title"].ToString() + "&lt;/h1&gt;"; ContentPane.InnerHtml += Microsoft.JScript.GlobalObject.unescape(dt.Rows[0]["content"].ToString()); } } } base.OnInit(e); } public static void DisablePageCaching() { //Used for disabling page caching HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); HttpContext.Current.Response.Cache.SetValidUntilExpires(false); HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetNoStore(); HttpContext.Current.Response.Cache.SetNoServerCaching(); HttpContext.Current.Response.Cache.SetSlidingExpiration(false); HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false); } } </code></pre> <p>If I used using system I get the error below:</p> <pre><code>Login failed for user 'sa'. 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.SqlClient.SqlException: Login failed for user 'sa'. Source Error: Line 44: string parentIdCol, pageNameCol, pageIdCol, pageTypeCol, pageContentCol; Line 45: Line 46: DataSet ds = Gen.SPs.GetAllPortalMenuItems(true).GetDataSet(); Line 47: Line 48: ds.DataSetName = "MenuItems"; Source File: App_Code\PortalContentController.cs Line: 46 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload