Wednesday, June 2, 2010

Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner






Following error will be given...

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first sure the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set database owner to a valid login, then add the database diagram support objects.

Because of there is not set owner for this Database. To set this do the following....

1. Right click on your database.

2. Select Properties.

3. In database property window, select File section.

4.Set owner to valid login such as your current login.









Thursday, February 11, 2010

ASP.NET: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.


protected void btn1_OnClick(object sender, EventArgs e)
{
try
{
//Do some coding here...

Response.Redirect("default2.aspx");
}

catch (Exception ex)
{
//handle event exception. write error to log file.
}
finally
{
//some coding. like colsing connection.
}
}

In this kind of coding, above error will be displayed. Reason there are codes to execute after redirecting page. To avoid this problem use following code.

Response.Redirect("default2.aspx",false);

Learning Video...

Loading...