Tag | SQL Posts

I run my development server by boot to VHD (Windows Server 2008 R2 x64). In that instance, I also have an attached VHD (I attach via script at boot up time using Task Scheduler). That VHD I have my SQL instances installed. So, the other day, acting hasty, I chmod my ACLS – wow, what a day after that. So, in order to fix it I created this set of BAT commands that resets it back to operational state – not 100% of all what you get, I also didn’t want to run a “repair” – but, all operational again. setlocal ...
[UPDATED 23/3/2010 with two new links from developmentor on STEs] I just posted on the bits you need to install to explore all the features of Entity Framework 4 with the Visual Studio 2010 RC. I’ve also had a quick look (March 12th 2010) to see what new resources are out there on EF4. They appear a little thin on the ground – but there are some gems. The following all caught my attention: Julie Lerman has published 2 How-to-videos on EF4 on pluralsight.com. You need to create a free guest pass to ...
For Visual Studio 2010 Professional Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250. If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstu... Visual Studio 2010 Professional includes a 12-month ...
In my previous example I have demonstrated how to create a simple form that would allow users to insert data to the database using L2S. In this example I’m going to demonstrate how to fetch and filter data from database and fill the fields in the form using L2S. This example is basically a continuation of my previous example here. So I would suggest you to take a look at my previous example first before you proceed reading this example. STEP 1: Setting up the GUI To get started, add a new WebForm ...
Few months ago, I’ve created a simple demo about “Creating a Simple Registration Form using the ADO.NET way”. In this article, I'm going to demonstrate how to create a simple form that would allows users to insert data to the database using L2S. As an overview, LINQ to SQL is a technology that allow you to query sql server. LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework "Orcas" release, and which allows you to model a relational database using .NET ...
When I get some time (and hell starts to look a little chilly) I would love to do a more detailed review. But I wanted to get something “out there” as I really like this book and reviews of it seem a little thin on the ground. In brief: Is it a good book? Yes Would I recommend this book to a .NET developer who was new to Ruby? Yes (This is me by the way) Would I recommend this book to a Ruby developer who was new to .NET ? Yes Would I recommend this book to a developer who sometimes does Ruby and ...
[You might want to also read other GuestPosts on my blog – or contribute one?] On the 26th and 27th of March (2010) myself and Edd Morgan of Microsoft will be popping along to the Scottish Ruby Conference. I dabble with Ruby and I am a huge fan whilst Edd is a “proper Ruby developer”. Hence I asked Edd if he was interested in creating a guest post or two for my blog on IronRuby. This is the second of those posts. If you should stumble across this post and happen to be attending the Scottish Ruby ...
In Windows Azure platform there are 3 storage we can use to save our data on the cloud. They are the Table, Blob and Queue. Before the Chinese New Year Microsoft announced that Azure SDK 1.1 had been released and it supports a new type of storage – Drive, which allows us to operate NTFS files on the cloud. I will cover it in the coming few posts but now I would like to talk a bit about the Table Storage. Concept of Table Storage Service The most common development scenario is to retrieve, create, ...
A few weeks ago we started getting complaints about performance in an application that has performed very well for many years. The application is a n-tier application that uses ADODB with the SQLOLEDB provider to talk to a SQL Server database. Our object model is written in such a way that each public method validates security before performing requested actions, so there is a significant number of queries executed to get information about file cabinets, retrieve images, create workflows, etc. (PaperWise ...
Surface is magic. Everyone using it seems to think that way. And I have to be honest, after working for almost 2 years with the platform I still get that special feeling the moment I turn on the unit to do some more work. The whole user experience, the rich environment of the SDK, the touch, even the look and feel of the Surface environment is so much different from the stuff I’ve been working on all my career that I am still bewildered by it. But… and this is a big but.. in the end we’re still talking ...
Quick Links Adding Volcanos and Options - Earthquake Locator, part 2 Live Demo Source Code The recent wave of earthquakes (no pun intended) being reported in the news got me wondering about the frequency and severity of earthquakes around the world. Since I’ve been doing a lot of Silverlight development lately, I decided to scratch my curiosity with a nice little Bing Maps application that will show the location and relative strength of recent seismic activity. Here is a list of technologies this ...
Catching up after our sixth code camp here in the Ft Lauderdale, FL area. Website at: http://www.fladotnet.com/co... For the 5th time, DeVry University hosted the event which makes everything else really easy! Statistics from 2010 South Florida Code Camp: 848 registered (we use Microsoft Group Events) ~ 600 attended (516 took name badges) 64 speakers (including speaker idol) 72 sessions 12 parallel tracks Food 400 waters 600 sodas 900 cups of coffee (it was cold!) 200 pounds of ice 200 pizza's ...
Identify early adopters Pick a small project with a small(ish) team. This can be a legacy application or a green-field application. Strive to find a team of early adopters that will be eager to try something new. Get the team on board! Research Research the tool(s) that you want to use. Some tools provide all of the features you would need while some only provide a slice of the pie. DBVCS requires the ability to manage a set of change scripts that update a database from one version to the next. Ideally ...
1) Turn off Tracing unless until required Tracing is one of the wonderful features which enable us to track the application's trace and the sequences. However, again it is useful only for developers and you can set this to "false" unless you require to monitor the trace logging. How it affects performance: Enabling tracing adds performance overhead and might expose private information, so it should be enabled only while an application is being actively analyzed. Solution: When not needed, tracing ...
Want a super mini .Net application to quickly send a Tweets> This baby does it straight from the command line, i.e just type I’ve just been using it, to notify my when certain long running SQL tasks complete. Mail me/or send me a Tweet :-) , if you’d like source…. Configure your username in the tweetit.app.config file ...
On Friday night, I took my life in my own hands and helped out out our local school PTA quiz night. Of course being a techie, what could I possibly add to an event like this. The answer of course is a scoreboard… Using a projector a laptop I perched myself at the front of a school hall in front of all the parents to either face a techie success or dismal humiliation in front of my peers. The scoreboard itself was an ASP.NET AJAX application that periodically and smoothly refreshed itself drawing ...
In this Issue: Phil Middlemiss, Jim Wightman, Jeremy Likness, Ross Wozniak, SilverLaw(-2-), XAMLNinja, Victor Gaudioso(-2-), Sergey Barskiy, and Jeff Handley. Shoutouts: Chris Klug posted The CommandManager that never dies…and ends up on Codeplex… Mike Swanson posted All About MIX10 From SilverlightCream.com: A Scalable Orb Radio Button Holy crap ... if you don't like this tutorial by Phil Middlemiss... just go back to programming DOS :) ... this is great... keep it coming, Phil! Using Silverlight ...
When Windows Azure was first released in 2008 the only programming languages you could use were .NET languages such as Visual Basic and C# and the applications you built had to run in Partial Trust (Similar to ASP.NET Medium Trust). In the interim we have made a number of changes including allowing applications to run in full trust, native code is now supported (no longer had to be managed code such as C#) and we support FastCGI applications. Which means: Windows Azure supports the Internet Information ...
The .NET community, unlike the Java and python community do not provide Data Mining solutions outside the framework of their RDBMS MS SQL Server. In my quest to integrate Data mining into an existing ASP.NET enterprise solution running on MySQL, i was faced with quite the task! In attempting to review existing solutions, i followed the following criteria: Open-source and free (not necessarily the same thing!) GUI for interactive data mining and exploration Concise, accessible and well documented ...
[UPDATED 10th March 2010: Edd produced a 2nd post on using IronRuby with WPF/.NET ] [You might want to also read other GuestPosts on my blog – or contribute one?] On the 26th and 27th of March (2010) myself and Edd Morgan of Microsoft will be popping along to the Scottish Ruby Conference. I dabble with Ruby and I am a huge fan whilst Edd is a “proper Ruby developer”. Hence I asked Edd if he was interested in creating a guest post for my blog on IronRuby. If you should stumble across this post and ...
On Saturday 35(ish) developers met up on rainy day in Birmingham to take part in an Open Space Code day on the Windows Azure Platform. Around 5 of us had experience of Open Space meetings or developing for Azure prior to the day – and I think only two of us had experience of both :-) As I was on point to keynote the day and make sure it was a success, I did turn up with a few concerns matched by a good deal of excitement. My primary concern was that people would expect to be trained – and the Open ...
A big thanks to everyone who came along last night (Feb 25th 2010) to the .NET Developer Network and to Guy for inviting me along and being a great host. I had lots of fun and enjoyed it being so interactive. As promised, some links relevant to the conversations during the evening and the many questions. I will also do a post on Monday summarising the many “limits” we discussed on instances, roles etc: New Windows Azure Platform online community in the UK – ning hosted community site for UK fans ...
Technorati Tags: General Pluralsight is an online .NET Training library which provides online training materials for .NET developers. Example trainings available on demand: · .NET 3.5 · Agile Team Practices · ASP.NET 3.5 · ASP.NET AJAX · ASP.NET MVC · BizTalk 2006 · BizTalk Server 2006 R2 · BizTalk Server 2009 · iPhone ASP.NET · LINQ · Managed Services Engine · Silverlight 3 · SharePoint Services · SQL Server 2008 · VSTS · WCF · Windows Server AppFabric, formerly "Dublin" · Windows Workflow · WPF ...
Last week, I needed to call the SQL Reporting Services Web Service to export reports as Excel, PDF, and Word formats. I could have used the [Add Web Reference...] as the MSDN Documentation Accessing the Report Server Web Service Using Visual Basic or Visual C#, but I decided to use [Add Service Reference...]. If you are wondering what the difference is between Web Reference and Service Reference, please read this blog post by Andrew Tokeley. Goal Create a common library project which I could reuse ...
BizTalk: Compensation Model As Charles Young mentioned, the Compensation is one of the most under-used features of the BizTalk. See “BizTalk Server 2006: The Compensation Model” article. If you didn’t read his article, I would strictly recommend it. Next article to read is “Transactions and Compensation Using BizTalk Server” by Richard Seroterand the "Atomic Transaction Shape" webcast by Alan Smith There are still many questions in using Compensation in BizTalk. · What is the proper order of the ...

To Check the date format of sql server:
select name ,alias, dateformat from syslanguages where langid =(select value from master..sysconfigures where comment = 'default language')

Execute this query on "master" database

You can set the Culture in your web.config file as below:
<system.web>
<globalization culture="en-US" />
</system.web>

Although the azure application will be running on the sky we still need to develop it on the ground since we would not be able to fly. In order to make it easy and simple to work with azure on local machine we need to download the Azure SDK firstly. Azure SDK extend Visual Studio 2008 and Visual Studio 2010 RC to enable the creation, configuration, building, debugging, running and packaging of scalable web applications and services on Windows Azure, and it includes all necessary assemblies which ...
When deploying the Microsoft.BizTalk.ESB.BAM.E... BAM activity (as part of the Core ESB Toolkit install) we ran into this error: --- OLE DB error: OLE DB or ODBC error: DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied : 08001 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘bam_ExcByApplication’, Name of ‘bamExcByApplication’ --- The issue was that we used a SQL Server Alias while configuring ...
Hi everybody, It has been a long time since my previous post about mapping stored procedure parameters to SSIS package variables post. I have been busy+lazy and never get around to posting a follow-up post until now. In this post, I will show how to execute a SSIS package using the dtexec Utility from a Stored Procedure because it is one of the most frequent questions I received for my previous blog post. First of all, I have a few important things to let you know. I am a Senior .NET Developer and ...
The following code is from Ralph Whitbeck's blog. This is really a "cut and save" for me :) When restoring an SQL Server Database, you'll often need to kill existing connections to it, before starting the task. Change databaseName To the actual database name. Use Master Go Declare @dbname sysname Set @dbname = 'databaseName' Declare @spid int Select @spid = min(spid) from master.dbo.sysprocesses where dbid = db_id(@dbname) While @spid Is Not Null Begin Execute ('Kill ' + @spid) Select @spid = min(spid) ...
To me Azure is a new technology but in fact it's not that new. In the PDC08 Microsoft announced that their cloud computing platform had been released with the name Azure, which stand for the color of the sky. I began to play with Azure recently and will post a series of blogs for what it is and how to use it. But first of all we'd better to understand what's Azure. If we went to the official website of Azure we can find the official definition. The Windows Azure platform offers a flexible, familiar ...
While my home development computer is fried I’m going to hack away at my backlog of non-code related posts. Today I’d like to discuss some of the advantages and disadvantages of using Microsoft MVC over WebForms. First of all, MVC is not the end all, magical platform that many people would like you to believe. In fact I wouldn’t even recommend it to beginner developers. However, if you have experience with .NET and you’re willing to put in the time to learn how MVC works, you will find that it offers ...
One thing most database change management tools use is SQL Server Managment Objects (SMO). Most do that because ADO.NET doesn’t allow the batch statement separator keyword GO in sql statements. So most people write off the ability to use a database change tool for sql server without actually having the sql server installed on the machine that is running the tool. This is not a reality in some organizations, especially when licenses for SQL server are limited. Split the GO Recently, a few guys have ...
Embedded Resource Group had built an ASP.NET website for its hourly contractors and employees to submit online timecards (i.e. web forms). To complement the website, Embedded Resource Group had also built an internal WinForms application for the administrator to utilize the timecard data. The timecard data, stored in SQL Server, is accessed to generate customer invoices and vendor receipts in QuickBooks, as well as to create reports that indicate missing and unapproved timecards and other metrics ...
In this all-submittal Issue: AfricanGeek(2), Michael Washington, Roberto Lopez, Brett Balmer, Rui Marinho, and Alex van Beek. Shoutout: Austin Avrashow has an interesting demo up of Mark Twain's Travels Just digging my way out from under being inundated with information for a week. Be patient, I'll catch up! From SilverlightCream.com: Silverlight Video Tutorial #13 AfricanGeek has 2 new video tutorials up on his site. This first one adds a Slider control to the Media Player and edits the Slider template ...
BAM Operations, a brief summary Installing the BAM infrastructure BAM infrastructure composed on the base of the SQL Analysis Services (SASS) and the SQL Integration Services (SISS). The SQL Notification Service is an optional element. 1. Before installing BAM make sure the SQL Analysis Services and the SQL Integration Services are installed. If not, install them. 2. Create the BAMAnalysis and the BAMStarSchema databases. It can be done in separate step or while the BizTalk configuration. 2.1. Start ...
We’re very happy to have Damir Bersinic from Microsoft come and present on SQL Server 2008 R2 on March 9th! Below is the event abstract: SQL Server 2008 R2 is coming soon featuring several breakthrough capabilities that will enable your organization to scale database operations with confidence, help improve IT and developer efficiency, and enable highly scalable and well managed Business Intelligence on a self-service basis for your users. Come and find out how these changes will impact your role ...
Just a brief note about events where you can expect to see me over the next few months in the UK (and TBH this post will be helpful reminder to me!) February DotNetDevNet - Thursday 25th February 2010 – talking Windows Azure and SQL Azure Azure Open Space Coding Day Feb 27th – coding on Azure March Qcon London 2010 March 11th – manning the Interop stand CloudCamp London March 11th – just being nice to people :) Cloud Computing Congress March 16th – talking on Azure DevWeek March 17th and 18th – talking ...
I've been meaning to post this for a little while, and a recent post on the SSAS forum at ssas-info.com prompted me to finally get around to it. Basically the small Powershell script below will attach to the specified SSAS server and script all of the databases out to an XMLA file. In this example I also add a timestamp in the form of YYYYMMDD to the end of the file. $serverName = "localhost\sql08" $outputFolder = "C:\data\" ## load the AMO and XML assemblies into the current runspace [System.Reflection.Assembly... ...
This should not require a blog post! That being said, I struggled on and off for several days before I hit the right sequence of steps to install the SSMS package onto my existing instance of SQL Server 2008 Express. When I initially installed SQL Server 2008 I downloaded the version that said it was “with tools”, assuming that meant I would get the light version of the Management Studio along with the instance. Okay, I know what assume means. And as usual, it did not work as it should have. I ended ...
I recently ran into a business problem that I can't find any sample code online. I think I worked out a tolerable solution. The business scenario is this: All rows retrieve from the database must be in edit mode, but only some fields should be in edit mode, not all. Editing one row at a time is out of the question. User might make changes and THEN want to sort the grid. Any user input needs to be preserved. Have to use .NET control that come out of the box with Visual Studio due to maintenance concerns. ...
Last week one of my colleague asked me that how we can send multiple records to SQL server procedure parameters. Let us discuss the scenario:- Application user has selected multiple product and now you want to send Customer details and corresponding order details data to SQL Server. To resolve this Microsoft has provided multiple approaches in SQL Server like Table and XML Parameter. I read somewhere that if you want to be a architect, try to solve each software problem with xml framework. Let us ...
Action Description Example AddLookupColumnToList Creates a new <b>list</b>-scoped lookup column pointing to an existing list. Download Quickstart AddSiteColumnToContentType Adds a site column to an existing content type. Download Quickstart AddSiteColumnToList Adds a site column to an existing SharePoint list. Download Quickstart CreateLookupColumn Creates a new <b>site</b>-scoped lookup column pointing to a field in an existing list. Download Quickstart EnsureSiteColumn Adds ...
Just getting a few interesting cloud links “down on paper”. I last did one of these on Azure in Dec 2009. Not everyone seems to know that Roger Jennings does a rocking job of collating links on Azure – e.g. Sunday Feb 14th. Recommended read - Using SQL Server Client APIs with SQL Azure Version 1.0 Q&A: Looking Ahead at Microsoft's Cloud Strategy Tim O'Brien, director of Microsoft's Platform Strategy Group, discusses the future of Windows Azure, Silverlight, and developing with .NET. Getting MySQL ...
I have been using VSeWSS 1.3 since it first became available. As of this writing it is still in the CTP release stage. The previous version, 1.2 is still available, but the biggest advantage of the 1.3 release is support for 64 bit OS which was a prime motivator for me. Also 1.3 now supports publishing sites which was not possible with the previous versions. VSeWss 1.3 March 2009 CTP is available, and is the version I am using for the purposes of this article. A good blog post about the extensions ...
Recently my son had noticed that I was reading eBooks on my BlackBerry Storm using MobiPocket reader. Since he and I share an interest in a lot of the same books, he inquired as to if he could do the same thing with his cell phone. Unfortunately his phone is not capable of running MobiPocket reader. I remembered that I still had my Sony Clie NX70V which in its day was a fantastic Palm device. And I used to use it to read eBooks with MobiPocket as well. The problem was that I was not sure I could ...
I recently conducted a small poll and it turns out that SQL Mobile is the most requested topic (see ongoing voting results here). So in this tutorial, we will cover how to create a SQL Mobile database for the PDA or emulator. Having seen the SQL Server Express (mentioned here), let's now look at SQL Mobile. Being the successor of SQL Server CE 2.0, SQL Mobile is Microsoft's lightweight database server that has a small enough footprint (~1.5MB) to fit and run smoothly in a Pocket PC device. It is ...
I normally use an int with an identity as the primary key for most tables in Sql Server and I think that is probably the normal habit of most developers, but on occasion, you will need to use a unique identifier, which maps to a System.Guid in code. I am not going to go into the pros/cons of using a Guid as your primary key, as there is much debate around this. I am currently working on a project where this is required and I also use Entity Framework 4 and ran in a snag almost immediately. Entity ...
We have just upgraded our TFS production system to the RC from Beta 2. Upgrading and Migration were done in 1.5 hour. More than 75 team projects upgraded. Our 30 internal developers and some more external will wake up to a new world tomorrow morning :-). Martin Hinshelwood managed to beat us with some hours http://blog.hinshelwood.com... but we must still be one of the very first companies to move over! We have a two-tier solution, ...

This handy bit of sql code returns the last identity value inserted into an identity column in the current scope and sets its value to the parameter @ID

SET @ID = SCOPE_IDENTITY()

I found this a very useful thing to get to grips with and start using in my code. For further information on scope identity hit this msdn link