Posts

Showing posts from 2010

SQL - ISO Country Names and Codes

SQL - ISO Country Names and Codes This document provides the necessary SQL statements for ISO 3166 country names and two and three letter codes. This page and the data are in UTF-8 encoding. Create Country Table Table is called base_country as it follows Edoceo naming conventions, change as necessary. This is for a PostgreSQL database, CREATE TABLE statements may need to be altered for your RDBMS. create table base_country ( id integer primary key, iso2 char(2), iso3 char(3), name_en varchar(64), name_fr varchar(64), name_de varchar(64) ); Create indexes as necessary, which may not be as this table is so small. Insert the Country Data This SQL should work on any SQL-99 compliant RDBMS. INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (1, 'AF', 'AFG', 'Afghanistan', NULL); INSERT INTO base_country (id, iso2, iso3, name_en, name_fr) VALUES (2, 'AX', 'ALA', 'Ă…land Islands', NULL); INSERT INTO ba

Sql StoredProcedure Optimization Tips

We will go over how to optimize Stored Procedure with making simple changes in the code. Please note there are many more other tips, which we will cover in future articles. Include SET NOCOUNT ON statement: With every SELECT and DML statement, the SQL server returns a message that indicates the number of affected rows by that statement. This information is mostly helpful in debugging the code, but it is useless after that. By setting SET NOCOUNT ON, we can disable the feature of returning this extra information. For stored procedures that contain several statements or contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost because network traffic is greatly reduced. CREATE PROC dbo.ProcName AS SET NOCOUNT ON; --Procedure code here SELECT column1 FROM dbo.TblTable1 -- Reset SET NOCOUNT to OFF SET NOCOUNT OFF; GO 

Command-line Building With csc.exe

Command-line Building With csc.exe You can invoke the C# compiler by typing the name of its executable file (csc.exe) on the command line. If you use the Visual Studio Command Prompt (available as a shortcut on the start menu under Visual Studio Tools), all the necessary environment variables are set for you. Otherwise, you must adjust your path in order to enable csc.exe to be invoked from any subdirectory on your computer. If you do not use the Visual Studio Command Prompt, you must run vsvars32.bat to set the appropriate environment variables to support command line builds. For more information about vsvars32.bat, see How to: Set Environment Variables. If you are working on a computer that only has the Windows Software Development Kit (SDK), you can use the C# compiler at the command line if you use the SDK Command Prompt , which is available from the Microsoft .NET Framework SDK menu option. You can also use MSBuild to programmatically build C# programs. For more informat

Differences Between C# Compiler and C++ Compiler Output

Differences Between C# Compiler and C++ Compiler Output -------------------------------------------------------------------------------- There are no object (.obj) files created as a result of invoking the C# compiler; output files are created directly. As a result of this, the C# compiler does not need a linker.

how to enable instance using sp_configure

hi friends, i find too many issues while attaching any database file in asp..net project so for that use the below command for enable instance configuration in your sqlExpress sp_configure  'user instances enabled', 1; RECONFIGURE

Computer on rent in Gandhinagar

sunrise computer sec-24 Reference by Vikaram Sagar Candid computer contact number sivrambhai 9427055568, nanjibhai 9408474313 P-3 on 400Rs. P-4 on 600Rs. Core 2 dual on 800 laxmi info sec-21 Reference by Mr.Drumil Kanani (Niral's old room mate ) hareshbhai 9825332949 P-4 on 1200 P-3 on 800

Jquey with Webservice in asp.net

Image
how to call webservice from JQuery please find following steps Please find following steps for Create one WebService in asp.net project with DummyTest.asmx [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] Create one Webmethod with SessionEnable = true [Webmethod(EnableSession=true)] Public string HelloWorld(string name) { //apply your logic here Return “Hello World” + name; } Come to aspx page and add jQuery Library at top of the page <script languge=”javascript” src=”jquery-1.3.2.js” ></script> <script languge=”javascript” src=”jquery-ui-1.7.2.min.js” ></script> ajax method parameters Type: “Post” or “Get” URL : your web service file name /Method name Data : paramert data for webmethod contentType: "application/json; charset=utf-8" dataType: "json" success : function error : function

SQL SERVER – Simple Example of Recursive CTE

Recursive is the process in which the query executes itself. It is used to get results based on the output of base query. We can use CTE as Recursive CTE (Common Table Expression). You can read my previous articles about CTE by searching at http://search.SQLAuthority.com . Here, the result of CTE is repeatedly used to get the final resultset. The following example will explain in detail where I am using AdventureWorks database and try to find hierarchy of Managers and Employees. USE AdventureWorks GO WITH Emp_CTE AS ( SELECT EmployeeID, ContactID, LoginID, ManagerID, Title, BirthDate FROM HumanResources.Employee WHERE ManagerID IS NULL UNION ALL SELECT e.EmployeeID, e.ContactID, e.LoginID, e.ManagerID, e.Title, e.BirthDate FROM HumanResources.Employee e INNER JOIN Emp_CTE ecte ON ecte.EmployeeID = e.ManagerID ) SELECT * FROM Emp_CTE GO In the above example Emp_CTE is a Common Expression Table, the base record for the CTE is derived by the first sql query before UNION A

Using ASP.NET MVC 2 to Query Twitter's Public API - FIFA 2010

Using ASP.NET MVC 2 to Query Twitter's Public API - FIFA 2010 If you've been living under a rock for the last few years, you might not have heard of Twitter, but for the rest of us, it is a great communication tool. I have made countless friends with it including the authors of DotNetCurry! Thankfully Twitter has a public Application Programming Interface (API) which you can use and incorporate into your site, if you'd like to add Twitter feeds to it. This article demonstrates how to do it using ASP.NET MVC. To see this in action, I'm going to create a small ASP.NET MVC 2 website. If you haven't got Microsoft Visual Studio 2010, you can download the Express edition here. To begin with, let's take a look at the Twitter's API. The documentation is here, but for a brief overview, here's what you can do: - search - trends - trends/current - trends/daily - trends/weekly I'm going to be using the search API to search Twitter. Search returns twe

important web link for jQuery Ajax

hi please find new link which will help us to make developer task very smooth.. GridView Confirmation Box Using JQuery BlockUI http://www.highoncoding.com/Articles/562_GridView_Confirmation_Box_Using_JQuery_BlockUI.aspx jQuery $(document).ready() and ASP.NET Ajax asynchronous postback http://blog.dreamlabsolutions.com/post/2009/02/24/jQuery-document-ready-and-ASP-NET-Ajax-asynchronous-postback.aspx http://runtingsproper.blogspot.com/2009/07/using-comparevalidator-to-check-input.html Using a CompareValidator to check input is a valid date http://www.dotnetspark.com/links/116-jquery-date-picker-implementation-asp-net.aspx http://www.regonline.com/register/checkin.aspx?EventId=841136 http://joshsmithonwpf.wordpress.com/2007/05/05/binding-a-treeview-to-a-dataset/

Hidden Stored Procedure in SqlServer

List of hidden Stored procedure in Sqlserver.. Name Function sp_cursor Update a cursor sp_cursorclose close a cursor sp_cursorexecute Open a prepared cursor sp_cursorfetch Fetch rows sp_cursoropen Open a cursor sp_cursoroption Set cursor options sp_cursorprepare Prepare a cursor statement sp_cursorprepexec Prepare a cursor statement and open sp_cursorunprepare Free a prepared cursor statement sp_execute Execute a prepared statement sp_prepare Prepare an SQL statement sp_prepexec Prepare and execute an SQL statement sp_unprepare Free a prepared statement Sp_cursoropen Defines the attributes of an API server cursor, such as its scrolling behavior and the statement used to build the result set on which the cursor operates, then populates the cursor. The statement can contain embedded parameters. Syntax sp_cursoropen [ @cursor = ] cursor_handle OUTPUT, [ @stmt = ] ' stmt ' [, [ @scrollopt = ] scroll_options OUTPUT] [, [ @ccopt = ] concurrency_options OU

Find job in Ahmedabad with the help of Consultancy Services

Vruksham Consultancy contact Person : NA contact No : 98255 06759 Contact person : Jagruti Contact No : 98248 90808 Contact person : NA Contact No : +91 79064501704 Fortune Consultancy Contact person : NA Contact No : +91 92274 00814 Alak malak Consultancy Contact person : Miss Prachi desai Contact No : +91 98980 75556 Call Candid Contact person : NA Contact No : +91 7930129266 Global Consultancy Contact person : NA Contact No : +91 98252 31005 +91 98982 27622 +91 93752 31005 AHM Consultancy Contact person : NA Contact No : +91 79 40034229 jobs@prakashinfotech.com Yashoda Kamble - 090330 90001 Hiranand Chawla - 096015 51234 Email Id:- http://draft.blogger.com/ WEB:- http://draft.blogger.com/ Coral Futures A – 303, Ganesh Plaza, Nr. Navrangpura Post Office, Navrangpura, Ahmedabad -380 009. Gujarat, India. Phone: +91 - 79 - 32441921. NicheTech Solutions Pvt. Ltd AHMEDABAD Contact Details NicheTech Solutions Pvt. Ltd. TF-23, Shukan Mall,

Difference between Stuff and Replace

What is STUFF and Replace. Differece between them. Stuff :: The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position. Syntax : STUFF (character_expression , start , length ,character_expression ) Usage in Real life Example : SELECT STUFF('abcdef', 2, 3, 'ijklmn'); GO Output :: ---------------------------------------------------------------------------------------- aijklmnef (1 row(s) affected) Command Highlights : Arguments --------------------------------------------------------------------------------

Automate the Generation of Stored Procedures for Your Database

Level of Difficulty 1 2 3 SUMMARY Design-time automation makes coding faster and ensures that all the procedures generated use the same naming conventions and structure. In an effort to improve their coding efficiency in a large SQL project, the authors wrote a set of design-time stored procedures that generate run-time stored procedures, and have used them in project after project ever since. Recently, the authors updated their procedures to make use of SQL Server 2000 features, including user-defined functions.