Software / Technology Tips

How to create a CatalogProperty and add enum values to it in CommerceServer using API

The Catalog schema consists of metadata like definitions for Products, properties and categories stored in the site’s product catalog database. Commerce Server Catalog System provides a set of APIs to manage catalog schema for your e-commerce site. By using this we can create definitions of property, category and product. We can also update the properties.…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Common Table Expression in SQL Server

Syntax of CTE:WITH CTE_NAME (Represents the column names for the defined CTE)** AS ( // SELECT statement whose result set populates the common table expression. ) SELECT * FROM CTE_NAME ; **Optional if there is no duplicity in column names in the result set of the CTE_query_definition Simple CTE Example:  WITH CTE_SalesOrder AS (SELECT SalesOrderNo,…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

FileTable in SQL 2012

Please make sure to point to right directories as per your SQL server’s installation and data and log file storage policies. We can create a FileTable now with the following command: USE SQLDocuments CREATE TABLE SQLDocumentStore AS FileTable WITH ( FileTable_Directory = ‘SQLDocuments’, FileTable_Collate_Filename = database_default ) We can now explore the file table in…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Usage of Extension Methods in C# 3.5

Introduction: C# 3.0 provides a new feature called Extension Methods.  Extension methods are methods that can be added to previously defined classes without rebuilding/compiling those classes. Process: To define an extension method, we first define a static class, Then we define our static method which is meant to be extended. The first parameter of the…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Insert bulk data using XML serialization and XQuery

Suppose I have a grid showing the entries of all employees (ID, Name, Exp etc.) and I have to store the checked row’s ID , Name, Address, Contact to a different table. So 1000+ row checked at a time will be a common senario. So there is a very simple and efficient way to insert…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

TRY_PARSE In SQL Server 2012

The output will be an Error with zero rows and the query fails! Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value ‘L00’ to data type int. We can make use of TRY_PARSE here and the output will come without error and show NULL for the row which had…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Some Useful SQL Queries

Some Useful SQL Queries Here are some SQL queries that I like to use. TO COUNT NUMBER OF TABLES IN A DB SELECT = COUNT(OBJ.ID) FROM SYSOBJECTS OBJ WHERE XTYPE=’U’ TO COUNT NUMBER OF STORED PROCEDURES IN A DB SELECT = COUNT(OBJ.ID) FROM SYSOBJECTS OBJ WHERE XTYPE=’P’ GET LIST OF TABLES NAMES AND THEIR ROW…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Customizing FCK Editor in ColdFusion

The content is all about customizing FCKEditor that is well integrated with ColdFusion. The content is all about customizing FCKEditor that is well integrated with ColdFusion. We have an editor known as FCKEditor to edit HTML content. We can use this editor by use of cftextarea in our Application. This gives us a complete set…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Calculating Cart total with discount applied at runtime in MS Commerce Server

This tip demonstrates how to format a cart at runtime and calculate the total (including discount amount) in MS Commerce Server. The steps are: Step 1: Create a new basket. For Example: Basket newBasket=OrderManager.GetBasket(Guid.NewGuid()); Step 2 : Add lineitems to the cart. For example: CommerceServerLineItem csLineItem = new CommerceServerLineItem(); csLineItem.ProductId ="1"; csLineItem.ProductCatalog = "Catalog"; csLineItem.ProductCategory…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!

Difference between @@IDENTITY, SCOPE_IDENTITY() and IDENT_CURRENT() in SQL SERVER

This tip elucidates the difference between @@IDENTITY, SCOPE_IDENTITY() and IDENT_CURRENT() in SQL SERVER When we set IDENTITY for a column, the column is known as AUTO INCREMENT column whose value is auto incremented by SQL Server on each insert. When we insert data into a table which has an IDENTITY column then for the IDENTITY column we do…

read more
150 150 Burnignorance | Where Minds Meet And Sparks Fly!