Saving changes is not permitted | Prevent saving changes that require table re-creation - Sql server

Mar 07, 2019 BY SOL

This problem occurs when the Prevent saving changes that require the table re-creation option is enabled, and you make one or more of the following changes to the table:You change the Allow Nulls setting for a column.You reorder columns in the table.You change the column data type.You add a new colu...

Filter record by Month and Year - Linq

Mar 04, 2019 BY SOL

This shows how to comparing the date part of datetime in a LINQ query. In a LINQ query it is easy to perform datetime comparisons, to compare only date not time part of a datetime field of data entity._events = (from a in _eventRegistory.Table where (a.fdate.Year == Year ...

Create, show and save XML Sitemap Dynamically - .Net Core

Feb 24, 2019 BY xtreme

WHAT IS XML SITEMAPAn XML (EXTENSIBLE MARKUP LANGUAGE) SITEMAP Is a Text File USED TO DETAIL ALL URLS ON A WEBSITE. IT CAN INCLUDE EXTRA INFORMATION (METADATA) ON EACH URL, WITH DETAILS OF WHEN THEY WERE LAST UPDATED, HOW IMPORTANT THEY ARE AND WHETHER THERE ARE ANY OTHER VERSIONS OF THE URL CREATED...

Group of Radio Buttons - Asp.Net MVC

Feb 21, 2019 BY xtreme

introductionHtmlHelper class includes two extension methods to generate Radio element in a razor view: RadioButton() and RadioButtonFor()RADIOBUTTONThe Html.RadioButton() method creates a radio button element with a specified name, isChecked boolean ...

Find All Columns of All Tables For a Keyword - Sql Server

Feb 20, 2019 BY xtreme

a custom functiondeclare @StringToSearch nvarchar(100) set @StringToSearch='Establishment'CREATE TABLE #Results (_ColumnName nvarchar(370), ColumnValue nvarchar(3630)) DECLARE @TableName nvarchar(256), @_ColumnName nvarchar(128), @SearchStr nvarchar(110) SET @TableName = '' SET @SearchStr = QUOT...

Find All Tables and Views Having Column with Specified Name - Sql Server

Feb 20, 2019 BY xtreme

Search Column Name in Tables n ViewsSELECT COLUMN_NAME AS 'ColumnName',TABLE_NAME AS 'TableName' FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE '%MyName%' ORDER BY TableName ,ColumnName; Search in Tables onlySELECT c.name AS 'ColumnName' ,t.name AS 'TableName' FROM sys.columns c JOIN ...

Parameterized Queries - Asp.Net

Feb 20, 2019 BY xtreme

A parameterized query includes placeholders for the actual data to be passed inUsing Sql Commandstring strQuery = "select Id,Name from Table where Name = @name"; SqlCommand cmd = new SqlCommand(strQuery, con); cmd.Parameters.AddWithValue("@name", txt.Text.Trim()); DataTable dt = GetData(cmd); ...