tag:blogger.com,1999:blog-52280092706141873602024-03-05T19:45:44.985-05:00Ravi Kakumani ....Dare 2 Dream -
Success is not final, failure is not fatal: it is the courage to continue that counts.Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-5228009270614187360.post-41518937079374320082011-05-17T02:35:00.000-04:002011-05-17T02:35:21.859-04:00Concatenating row values in Transact-SQLNice article for concatenating row values in SQL: Click HereRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-45411091243370563282010-11-12T08:35:00.002-05:002010-11-12T08:35:42.622-05:00Implementing Role-Based Security with ASP.NET 2.0 using Windows Authentication and SQL ServerImplementing Role-Based Security with ASP.NET 2.0 using Windows Authentication and SQL Server Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-738680462303287142010-11-12T08:34:00.000-05:002010-11-12T08:34:17.804-05:00Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005 Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-25965267028701295692010-06-03T00:26:00.000-04:002010-06-03T00:26:26.383-04:00SNOW in Ellicott City, MDRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com1tag:blogger.com,1999:blog-5228009270614187360.post-91636514707945308022010-05-26T18:10:00.002-04:002010-05-26T18:13:18.423-04:00Excute SSIS package from .NET applicationFowlloing code is used to excute SSIS package from web or windows applications.
First we need to add reference Microsoft.SqlServer.ManagedDTS to the project ( Right click on References. Click on 'Add Reference'. It will pop up Add reference window. select Microsoft.SqlServer.ManagedDTS under .NET components and click on OK).
HTML Source:
<html xmlns="http://www.w3.org/Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-38996158271835804772010-03-09T12:57:00.000-05:002010-03-09T12:57:34.075-05:00Search tables by using column name in SQL ServerFollowing query is used to find all tables and views which contain specific column name.
SELECT [TABLE NAME]=SYSOBJECTS.NAME,
[COLUMN NAME]=SYSCOLUMNS.NAME,
[DATA TYPE]=SYSTYPES.NAME,
[COLUMN LENGTH] = SYSCOLUMNS.LENGTH
FROM SYSOBJECTS
JOIN SYSCOLUMNS ON SYSOBJECTS.ID = SYSCOLUMNS.ID
JOIN SYSTYPES ON SYSCOLUMNS.XTYPE=SYSTYPES.XTYPE
WHERE SYSCOLUMNS.NAME ='COLUMN NAME'
You need to Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-10714094405239395672010-03-09T11:53:00.000-05:002010-03-09T11:53:52.472-05:00List of all Tables, Views and their columns in selected SQl databaseFollowing query gives complete list of tables and views in a SQL database.
USE [DATABASE NAME]
GO
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
Following is the sample query to get column names and data types for selected table:
SELECT
COLUMN_NAME 'COLUMN NAME',
DATA_TYPE 'DATA TYPE',
COULMN_DEFAULT 'COLUMN DEFAULT'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'TABLE NAME'&Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-22625888015421474072010-02-16T14:56:00.000-05:002010-02-16T14:56:05.242-05:00Duplicate rows in a tableFollowing code is used to find duplicate rows in a Table, which doesn't have primary key. You can use either GROUP clause or HAVING clause to get all duplicate rows.
HAVING Clause:
SELECT COLUMN_NAME
FROM TABLENAME
GROUP BY COLUMN_NAME
HAVING COUNT(*) >1
GROUP BY Clause:
SELECT * FROM (
SELECT COLUMN_NAME, COUNT(COLUMN_NAME) AS CNT
FROM TABLENAME
GROUP BY COLUMN_NAME) AS A
WHERE CNT>1Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-89615579006240209292009-10-05T16:05:00.000-04:002009-10-05T16:05:42.883-04:00Enable version settings in a SharePoint listYou can enable Version Settings for SharePoint lists so that they track versions of the items they contain. You can specify the number of versions to track and also view prior versions of items in the list. When version tracking is enabled for the list, each time the data in a row changes, Windows SharePoint Services creates a new version of that row.
To enable version tracking, you need the Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-23950685671661772172009-10-05T15:52:00.000-04:002009-10-05T15:52:17.176-04:00Show/Hide "Create Folder" in Lists in SharePointThis article explains how to Show or Hide New Folder options in lists or documents in SharePoint.
When created a List(Lists can be documents, project task, e.t.c) in the Sharepoint, by default it will give the option Create Folder under New task under that list. For hiding the Create New Folder option, First, you should be owner to the site and then follow the following steps..
Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-6173586087260562782009-09-23T18:15:00.008-04:002009-09-23T19:24:11.818-04:00Maintain Scroll Position in ASP.NET 2.0This article explains, how to maintain current page scroll position across page postback events.
When working with large data in gridview, Scroll down the page and doing some thing that causes a postback, Then page automatically set back to the top position rather than staying at the current scroll position.
Smartnavigation (Smartnavigation = true) feature was using in .NET 1.X frame work. But Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-77238501413468597482009-08-27T11:44:00.002-04:002009-08-27T11:55:40.608-04:00Using windows MessageBox in ASP.NETI have seen in the forums, lot of people are asking for using Windows MessageBox in ASP.NET. It's pretty simple. Just you need to Add System.Windows.Forms namespace to references. Follow these steps:1) Right Click on References in your solution explorer 2) Click on Add References. Add References window will be open3) Under .NET tab select System.Windows.Forms, Click Ok. Now it added to your Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-32431843127004193322009-08-20T12:46:00.002-04:002009-08-20T12:54:02.429-04:00Ceating Indexes on views in SQL 2005When I was creating Index on view, I got the following error. "Cannot create index on view 'v_testview' because the view is not schema bound. (Microsoft SQL Server, Error: 1939)". Following link helped me to figure out the solution.http://www.mssqltips.com/tip.asp?tip=1610It may hellpfull to you also..Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-67134249448578155572009-08-08T06:32:00.004-04:002009-08-08T13:10:34.912-04:00Restore existing database in SQL 20051)Open Microsoft SQL Server Studio, Login with your SQL Credentials or using Windows Authentication mode.2)Create New Database with name “DatabaseName”, Set path for MDF and LDF files on your local computer. 3) Right click on the created databse("DatabaseName") in Object Browser Window and select Task->Restore->Database option. You will get restore database wizard opened.4) On General Menu, Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-70269168200734579652009-08-08T02:03:00.005-04:002009-08-08T13:10:42.374-04:00Debug problem in older version Visual Studio(VS2003 & VS2005) with IE 8I had done lot of research to fix my debug problem in Visual Studio 2005. Finally, I got the solution.Problem: Debug is not working for VS 2005 with IE8Solution:Go to Start Select Run Enter RegEdit (this opens Registry Editor Window)Go Thru HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Internet Explorer\MainCheck for the key TabProcGrowth, if you haven't find add new DWORD with the name TabProcGrowth Set Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-7039952317392799642009-07-29T02:26:00.004-04:002009-08-08T13:10:52.955-04:00Use nvarchar(max) for ntext in MS SQL 2005 and later versionsError:The ntext data type cannot be selected as DISTINCT because it is not comparableProb: Union fails, If a table contains nText datatype fieldAnswer: Use nVarChar(MAX)(This works only SQL 2005 and Above versions)Similarly, use VarChar(MAX) for TEXT, varbinary(max) for imageRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-36341491729985577922009-07-14T15:56:00.002-04:002009-07-14T16:02:46.345-04:00Conenction in tns ORA file for conencting to Oracle data baseFor conencting to Oracle database, First you need to create connection string in TNS ORA file. 1) go to C:\ORANT\NETWORK\ADMIN2) Open tns names.ora file3) Modify your variable in the following stringEXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = PLSExtProc) ) )Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-26216219595752837422009-07-14T15:32:00.007-04:002009-08-08T13:11:10.541-04:00Connecting to Databases from SSIS COnnection managerCouple of guys asked me about conencting to ACCESS from SSIS. I thought, It's betetr to put in my blog..1) Right click in Connection manager window(Which is appear at the bottom of the visual studio)2) Select New OLEDB Connection3) You will get "Configure OLEDB Connection Manger:" window. Click on NEW button4) Select Provider, What ever database you want to connect Ex: use OLEDB\SQL Native Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-22719712778814544012009-06-17T10:48:00.004-04:002009-06-17T12:34:51.364-04:00Creating new SSIS package got error: Failed to save package file with error 0x8002802B Element not foundProblem: Error when creating new SSIS package:Failed to save package file 'C:\documents and settings\local settings\temp\tmp172.tmp" with error 0x8002802B Element not foundSolution:1) From the start menu, click run2) enter the code: regsvr32 %windir%\system32\msxml6.dll3) click enter4)RegSvr32 pop up will come up, Click OKRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com1tag:blogger.com,1999:blog-5228009270614187360.post-22960061272670123162009-02-20T04:05:00.002-05:002009-02-20T04:36:54.195-05:00Compare two complete ROWS( all columns of each row) in two seperate TABLESIf you have two separate tables with same primary key and want to check the updates in the other table,using BINARY_CHECKSUM would be the best answer. But need to careful about column data types. Column Data types shouldn't be text, ntext, image, XML, and cursor.Here is T-SQL query to compare two rows from different table:Take ORDERS1 as one table and ORDERS2 as other tableSELECT ORDERS1.Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-8809863650255744782009-02-18T10:20:00.004-05:002009-02-20T04:36:46.213-05:00Apply page themes programmaticallyapply a page themes programmatically:Need to set page's 'Theme' Property in Page's Preint eventprotected void Page_PreInit(object sender, EventArgs e){ switch (Request.QueryString["theme"]) { case "Orange": Page.Theme = "OrangeTheme"; break; case "skyblue": Page.Theme = "skyblueTheme"; break; }}apply a style sheet themes Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-60982380895200894172009-02-08T03:06:00.002-05:002009-02-20T04:36:12.104-05:00Save not permitted in SQL Server 2008 Express Management StudioI got the following message, When I was trying to change or add new columns for tables in SQL Server 2008 Express.Message: " Save not Permitted. The changes you have made require the following tables need to dropped and re-created. you have either made changes to a table that can't be re-created or enabled the option preventing saving changes that require table to b re-created." The only choice IRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com1tag:blogger.com,1999:blog-5228009270614187360.post-77066894384231813722009-01-27T18:05:00.003-05:002009-02-08T03:06:40.168-05:00Error when exporting GridView to ExcelFix for error :" Control 'ctl00_ContentPlaceHolder1_Gridview1' of type 'GridView' must be placed inside a form tag with runat=server"Fix: Add the following code in cs file.public override void VerifyRenderingInServerForm(Control control){ // Confirms that an HtmlForm control is rendered for the //specified ASP.NET server control at run time.}Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-28854238512499488892009-01-27T16:43:00.002-05:002009-01-27T17:04:43.591-05:00Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.First try by using Connect time outIf it won't work, make the commandtimeout to 0ex: sqlCmd.CommandTimeout = 0;The Connect Timeout attribute of a SQL Connection string determines how long a SqlConnection Object runs before it stops attempting to connect to a serverRavi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0tag:blogger.com,1999:blog-5228009270614187360.post-55141769812288297912008-12-22T01:30:00.004-05:002008-12-22T01:45:03.961-05:00AJAX Control ToolKit 3.5Here are the steps to add AJAX Control Toolkit to VS2008Download toolkit http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488Unzip the the fileAdd all folders in Sample website to BinariesOpen New website in Visualstudio 2008Add tab in toolbox(Right click in toolbox and select ADD TAB), name it as AJAX Control tool kitRight click under AJAX Control and select "Ravi S Kakumanihttp://www.blogger.com/profile/16621718640794291172noreply@blogger.com0