Learning Curve…

Archive for December 2011

Just add these lines before your SP Statements. :-

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


Exp :-

Use YourDatabaseName

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE …

Tags: ,

Lets say , you have added a class with a different namespace folder or project  and then calling this class in your aspx.cs page where you have not added class’s namespace.Notice how you immediately get an error when you type class name because it’s defined in a namespace that is not in scope. You can fix the proble in two ways.

1. You can type Imports class’s namespace if you’re using VB.NET or using class’s namespace; if you’re using C# at the top of the code file.

2.You can click the word class name in your calling page once and then press Ctrl+. (Ctrl+Dot) to bring up a dialog that lets you choose the fix for the problem. Choose the appropriate item and .net will adds the necessary Imports/using statement for you.

A very good and detailed article on  WebProfile Builder and WAP for VS2010 can be found on :-

WebProfile Builder and WAP

If your are using DevExpress Controls ,This issue can be resolved with following steps :-

1. Add Namspace  – DevExpress.Web.ASPxClasses;

2.Instead of passing you navigation string in response.redirect function use ASPxWebControl.RedirectOnCallback method.

Example :- ASPxWebControl.RedirectOnCallback(UrURLString);

Here is the Query to Insert large data in a sql table to test performance . This query could come in handy to test performance of application with  large data .

Just replace 1000000 in below query with your desired number of rows in a table.

DECLARE @intFlag INT
SET @intFlag = 1
WHILE (@intFlag <=1000000)
BEGIN

SET @intFlag = @intFlag + 1
INSERT INTO dbo.testTable
(id,Name)
VALUES
(newid(),’test’)
END
PRINT @intFlag
GO

Note :-after adding large data in your table , you may want to replace hard coded strings (like ‘test’ in above query) with some unique values to make data more readable , you can use below technique for the same :-

https://nikhatshahin.wordpress.com/2010/12/20/row_number-and-overorder-by/

Tags:

With the ADO.NET Entity Framework (EF), you take a bunch of database objects like tables and turn them into .NET objects that you can access in your code. You can then use these objects in queries or use them directly in data-binding scenarios. EF also enables you to do the reverse: design an object model first and then let EF create the necessary database structure for you.
Working with EF is pretty easy and quite flexible. Using a diagram designer, you drag and drop objects like tables from your database into your Entity model. The objects you drop on the diagram become available as objects. For example, if you drop the TableXYZ table on the diagram, you end up with a strongly typed TableXYZ class. You can create instances of this class using LINQ queries and
other means.

When you drop more than one related database table on your diagram, the designer detects the relationships between the tables and then replicates these relationships in your object model.


Learning days (Calendar)

December 2011
M T W T F S S
« Nov   Jan »
 1234
567891011
12131415161718
19202122232425
262728293031  

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 504,344 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: