Tag | Database Posts

Every now and again you may come across an error when trying to update a database from a data driven control (i.e. gridview, formview) that is tied to a SQL or Object data source. The errors usually are along the lines of “Could not find xxx that has parameters” along with a list of those parameters. Or an error that states there are too many parameters being passed. Aside from looking for typos, counting or lining up the parameters I will use one of these techniques to try and narrow down what may ...
Yes, I know, the multiple file uploading in ASP.NET issue has been exhaustively covered already elsewhere. There are examples of multiple file uploading using ASP.NET user controls, there are examples using jQuery, there are examples using flash to provide progress feedback, and even examples in Silverlight. However, what I wanted was a simple solution which allows the user to select a variable number of files, didn’t rely on postbacks in order to increase or decrease the number of files selected, ...
Here’s a great list of new Azure and cloud related projects on CodePlex. All of these are very helpful tools. Client Cloud Services, Client Cloud Services (CCS) is a set of Windows Azure-based services which help application developers integrate licensing, trial management, feedback, error reporting and product usage into their applications Azure Storage Manager, Azure Storage Manager helps you organize your Azure Storage Accounts and to modify data on them. It is written in C# 3.5 and has no other ...
Sure many sharepoint Admin/ Developers/Architects must have come across this issue when trying to uninstall and re- install Sharepoint 2007. I have uninstalled sharepoint instance before just by going to the Add Remove programs and it was a breeze. But on my Dev server when i tried the same but nothing basically happened. The status bar did show as if it was uninstalled but when i go back and check nothing was removed :( I later found this which did help :www.howtonetworking.com/ms... ...
If you like to migrate your Web tier or the ASP.NET Application to Windows Azure, check my new posts Part I and Part II In the previous post we had examined on getting access to SQL Azure, creating your first database, accessing it with SQL Server Management Studio and then migrating the Northwind database schema to SQL Azure using the SQL Azure Migration Wizard Beta. UPDATE: The latest version of SQL Azure Migration Wizard migrates both Data and Schema. You can download the same from http://sqlazuremw.codeplex.... ...
If you like to migrate your Web tier or the ASP.NET Application to Windows Azure, check my new posts Part I and Part II SQL Azure is the latest buzz around Cloud Computing and the ability to take relational database to the cloud as is, is something most would welcome compared to the earlier model of ACE (Authority, Container, Entity) that was there when SQL Azure was SSDS. Well, like others, I also got interested and wanted to explore the SQL Azure. SQL Azure is currently in CTP and offers token ...
I was having in interesting discussion with Yossi Dahan following a recent SBUG meeting, as most user group sessions go the meeting was good but there was also some good discussion in the pub afterwards. Anyway we got onto the subject of caching and BizTalk and we discussed a few things I wrote ages ago about using NCache with BizTalk. As a follow up to this discussion I ran a few tests to get some rough figures to show some of the benefits of caching of data in this context. The previous article ...
Well, I finally got around to posting to this thing. Shocking, I know. Chalk it up to being extremely busy (or just extremely lazy) over the past couple of weeks. Either way I'm here now and that means this site just got 99% more pink! I guess I should probably introduce myself. Currently I'm working as a ASP .NET web developer and it's generally a pretty good time. I hadn't used ASP .NET much before so I'm definently learning a lot. Before this I did a bit of contract work for a company using Microsoft ...
What is Web Client Software Factory (WCSF)? WCSF is a web client development pattern recommended by Microsoft. You can use the software factory to easily create Web client applications with a consistent architecture. It helps you quickly incorporate many of the proven practices and patterns of building Web client applications What do I achieve out of this? 1. Your development time goes down a lot. 2. You will have a consistent architecture. 3. You will get a guidance automation package to guide you ...
Environment: Windows server 2008 Web Edition + IIS7 + .net 3.5sp1. I had following error while trying to install SQL 2008 express: It happens after click on “Install” button, when setup collected all necessary info, such as installation path, db server settings, etc. Google found 20+ topics on forums, newsgroups and ms connect, but they hasn’t solutions, or solution is for CTP version of SQL 2008. I start setup with admin privilegies, update windows server, repair .net installation – it’s useless. ...
We get Flumphs from several, different providers. Each provider has various settings that the system uses for them - particular URL routes, specific timeouts, etc. In the old Proxy, anything that absolutely had to be client-specific was stored in a configuration file. The timeout limit was universal. Here's the kicker - the only thing in the Flumph that gets sent to us that clues us into the provider is the structure of the XML. Since our Flumph providers delight in sending their own formats, we ...
There are lots of places we can use XML 1. Where we need a place to hold some data, can read / write / manipulate without having any database. Even we can use textfile, but XML is more flexible – say which field, what is the data type, etc., if we use text file, we need to predefine what is the sequence of each column and what dataype etc., 2. Where we need to transfer some data from one pace to another like one layer to another, one tier to another etc., – we can serialize the xml and deserialize ...
You guys have heard the song "Synchronicity 2," right? Am I the only person who thinks Sting did that song for his own amusement? Cackling in his lush, vaguely European voice at the fans scrambling to figure out the deeper meaning between a harried husband going through his day and the Loch Ness Monster getting his killing on. I can just see him laughing atop his enormous piles of money as people make connections with Carl Jung and nod their heads sagely at the unique, but highly apt, metaphor. Ah, ...
Today is just another quick tip of something that took me a while to embrace, but once I did, I can’t live without it. Here’s an example. I have a try/catch block in my code for a button that runs a database process. I want it to catch any exceptions that come back and handle them by printing the message to the user. (Just a real rudimentary example to show how to use this shortcut:) catch(Exception ex) { if (ex.InnerException != null) { StatusLabel.Text = ex.InnerException.Message; } else { StatusLabel.Text ...
log4net is a great little logging library. There seem to be some mixed results out there as to whether or not it outperforms the Enterprise Library's Logging Application Block, although it appears to me the general findings are that log4net is faster. For me, I guess it would come down to how badly I wanted integration with the rest of the Enterprise Library. If that's not a priority, log4net can be a lightweight, fast way to get logging going in your application. Once you've got the library in your ...
I'm using the ASP.NET membership provider. While testing, I overrode the machine.config and set my password to as follows passwordFormat="Clear" I removed the override (switching it back to the machine.config value of "Hashed"). New accounts are being added with a hashed password. Reseting a password for an account created while the value was set to "Clear" does not hash the password. The passwords for these users remains in clear text. TODO: To hash the accounts that were already added, I need to ...
This is one of a series of posts on my preparations for sessions on Azure and ORMs at Software Architect 2009. [Initual release 22nd Sept 2009] [Updated 23rd Sept, with links from Julie Lerman] [Updated 2nd Oct, with slidedeck section] [Large Update 15th Dec – including PDC09 content, my new posts and plenty of stuff from Julie L, Tony and others] This is my attempt to pull together all (ok – most) of the improvements in Entity Framework 4.0 and aggregate useful resources against each. It is very ...
I’m working on a presentation for the Baton Rouge .Net User Group in October on DI so I thought I’d go over some of the reasons to move to DI. Here’s my short list: Better design through loose coupling That’s about it. There are other reasons that I consider side effects of good design: Testability – easier to test components in isolation since their dependencies can be mocked Flexibility – easier to use alternative implementations since you only need to change the registered components Those are ...
The first bug I was asked to fix, here, was a bug in the Q Framework. Our websites use a little pop-up, calendar datepicker (I believe it's the jQuery datepicker, but I'd have to check). The problem we were experiencing is when we added a UK client. As most of you know, the UK displays dates in DD-MM-YYYY format as opposed to the US MM-DD-YYYY format. This trivial detail actually has a wide range of implications. First of all, any US-oriented datepicker is going to have a conniption if you pass it ...
In previous parts (see here and here, I will refer to the examples therein throughout the following), I described a problem with O/R-mappers like NHibernate that could possibly break domain code which is relying on type information in some way or the other (this is not only relevant for casting issues!). The problem occurs when NH creates a lazy loading proxy for a polymorphic object, not knowing the exact type of the proxy at creation time. - Sure, you can easily circumvent the described issue if ...
While SQL Server security features continue to improve, hashing in SQL Server using native functions is simple, but not necessarily up to speed on the latest security specifications. The good news however, is that using extended stored procedures allows database developers to take advantage of the strength of .NET using the System.Security.Cryptography namespace. I started to evaluate Hashing capabilities within SQL 2005 and 2008 and as it turns out, hashing is extremely simple using the HASHBYTES ...
I tend to always have side projects going on. I think many developers are like this, either because we want to learn new things or have the opportunity to work on things that directly interest us or to make a little extra cash. Two of my side projects are the Pathfinder Project and Zombie Apocalypse. Pathfinder Project There are two kinds of companies in the world: the ones that listen to what consumers want and give it to them, and the ones that shove what they want to give you down your thoat and ...
This isn't necessarily Silverlight, but it's important to bloggers, so I'm using that tag. If you're not using Grafitti and don't care to read my rant, just delete! I was using the free version of Grafitti for our Phoenix Silverlight User Group. I really didn't feel I had the time or inclination to write yet another site, and nobody was jumping up and down asking to do it for me :) Notice I said 'was'. During the Silverlight FireStarter yesterday, I wanted to Twitter that we also have a User Group ...
This scheduler is not a time-based scheduler. It schedules the user tasks according to scheduling policy; scheduling policy is First Come First Serve. It performs the following tasks: It decides which request to execute next. Execute the request by one of the threads of manual thread pool if there is an idle thread in manual thread pool. Here a specific number of threads is used to process the clients request. When Scheduler starts, A pool of threads is created to process pending requests of client, ...
I got this error on production for a report which was working fine in Dev and it took me a while to figure out the cause. Report's Data Source was pointing to a SQL Server View, when I looked at the SQL Query ( Database - > Show SQL Query ), I noticed that Database name was there with view name: "DbName.dbo.ViewName" I did a lot of googling, trying to figure out a way to change this behaviour and have just "dbo.ViewName" in SQL, but in vain. For now, I have fixed it by putting the SQL in the view ...
Just a quick post to talk about the Smart DJ feature in the latest release (Version: 4.0.740.0) of the Zune software. There are several web sites that read from a database of music-listening user preferences, and display music maps based on an artist or song (music-map.com, for one). Zune has taken that one step further with their Smart DJ feature, which allows you to select an artist, album, or a song, and have the Smart DJ create a playlist based on similar songs, artists, genres, or whatever black ...
EDIT: Lesson learned. Don't copy and paste code from Visual Studio into this blog. This was something I did not know how to do until I started working here, and since learning it, I've been finding uses for it all over the place, both in my work projects and in my own projects. In previous posts, I talked about how we often use attributes to store metadata as opposed to getting those values from a database or an XML/config file of some kind. Metadata is something that comes up in virtually every ...
[Source: http://geekswithblogs.net/E... The ASP.NET Web Part framework uses a plug-in framework for loading and saving personalization data to a persistent source. Out of the box, a SQL Server data source is provided (via the aspnet_regsql tool), along with a SQL personalization provider – specified in the system.web configuration section: <webParts enableExport="true"> <personalization defaultProvider="SqlPersona... "> <providers> <add name="SqlPersonalizationPro... ...
One of my friends read my last post and, after an analogy involving candy stores and Japanese wrappers (or was it Japanese rappers? I think both would have worked), I decided it might be a good idea to put up some sample code to demonstrate some of the things I was talking about. I'm going to use some test code from the MVC module - mostly because I'm the most deeply into that code right now, but also because writing my own MVC framework makes me look like a total stud. At least to people who consider ...
All right, so it may have been a day or two since my last post. I was hoping I'd have the option to post-date to make it look like I was a much more diligent blogger than I really am, but oh well. Apart from just wanting to look like I blog more regularly than once a quarter, there's actually a lot of material to cover. I'm not sure exactly how I want to accomplish this, so there might be a spate of blogs close together just to cover all the things I've worked on so far and the challenges involved. ...
Well, here we are again. Last time, we talked about project structure and came up with the one we’ll use for this series. Next we’ll talk tools. We’ll talk tools like Tim Taylor talks tools: with lots of grunts for my favorites and only a little explanation about what the tools do.) This is mostly because there is LOTS of material on the interwebs about all of these tools. I tend to favor the tools that are the most widely used for two main reasons: they have been battle tested by the largest crowd ...
In my experience with SSRS, I have noticed that there are two types of report developers: 1) SQL Developer that naturally flowed into SSRS, uses Stored Procedures for database development and has a very solid background for development. 2) Developers from other categories that somehow fell into SSRS. I come from the second school but I have an endless desire for learning about technology and have been fortunate enough to work with some really intelligent developers. Which brings me to one of the ...
For many customers the ROI on software licences is one of the key factors when purchasing software, so when deploying an e-Commerce solution the level of return for frameworks, and CMS platforms such as Commerce Server and MOSS are quite justifiable, however it is the extra features – such as the Store Locator that is difficult spending licensing money on. The current store locator within CS 2009 is based on a commercial Microsoft Virtual Earth web-service, which is provided for non-developer used ...
I was asked to present on RIA Services with Silverlight for the FUNdamentals session of the East Bay .NET User Group last week. Even though I only had 30 minutes to present on the topic, I decided to show the full development of a CRUD application. With RIA Services this is a straight forward thing to do and still allowed time to explain the concepts in use. The solution found here is the code that was built during the demonstration at the user group. It shows the use of Entity Framework to connect ...
Let's face it: Setting up NHibernate is not one of the easiest tasks. You need a good knowledge of the system, and you need to write some configuration xml to your config files (well, normally). This is not such a big deal for the main project, since you only have to do it once in a project's lifetime. But you also have to care about setting it up for each and every test project that uses NHibernate, and there might be a lot of them if you're consequently unit testing just about everything. So, wouldn't ...
Today I ran into a problem when I tried to upgrade some Websites to DNN 5. I created my backups of the site and my database as I should do to prepare for an upgrade. My problem was that I didn't follow the proper upgrade path and I tried to skip one and ran into errors. I should have read Will Strohl's blog on this but I found a little bit of time to do this and then had to devout more time to fix it. Ever run into this? So my web.config file was messed up and I immediately went to the DotNetNuke ...
Turing Project Page: [Novice: 9 | Advanced: 6 ] FAQ | Table of Contents | Definitions What is this and where do I start? [Reposted here while my primary blog is sorted out ] From Database to DataGrid The next step in Project Turing is to create a first iteration of the Silverlight application that will retrieve data from our database. Using our technology of choice: the Data Entity Framework coupled with .Net RIA Services. .Net RIA Services will allow us to create business logic on the server and ...
Last Time… we looked at installing and setting up VisualSVN Server to be our Source Code Management (SCM) system. With our SCM system all set up, now we need to take a look at how to best take advantage of its features. We’ll look at common folder structures for code repositories and what they folder do/mean. Just about anyone who has used some sort of code repository has probably seen this structure: This is a very common pattern because it highlights the three main things you want your repository ...
I had looked up the LoadControl(“”) method earlier today, and came upon a short website entry that quickly discussed how to load a web user control (.ascx) dynamically onto a page. The link is: http://www.codeproject.com/... It mentioned inside that a CMS (content management system) could be built using this method + a database table to track these controls. It got me intrigued, so I decided to pursue it. It’s pretty simple, and actually adds a lot of cool functionality ...
Surprisingly (or maybe not), I have heard this question and its many variations several times over my career, even more so the past couple of years. It really is a very simple question without a very simple answer, especially since it is highly subjective. From personal opinion (like I said, subjective), what constitutes a good developer is that they exhibit few (if any) bad developer traits, AND, they bring more to the table than just code. Writing code is just one component of the job. A bad developer: ...
Almost every software project comes with a database. Sometimes it will be developed from scratch and in parallel with the actual domain model for a new (aka. 'greenfield') project, sometimes it will be a pre-existent datastore provided by the customer or coming from an already running software that has to be extended (then we can call it a 'brownfield' project). In either case, you will likely end up with a bunch of database scripts that need to be executed as part of your installation process. I ...
If you spend some time using Fluent NHibernate, you’ll want to use its neat style of mapping for all data access, even when you’re working against traditional DALs. I’ve put a sample up on MSDN Code Gallery for this scenario, using a fluent style of mapping between domain objects and data readers populated by stored procedure calls. The interface is very similar to FNH, with a mapping class used for each domain entity – this is a simple mapping class: public class PostCodeMap : DataReaderMap<PostCode> ...
EDIT: It turned out that the original example herein is not very clear about the point I want to make. Therefore I posted a follow-up with a better and more precise example (see here). Recently, I came about this blog post, which describes an interesting problem about NHibernate, lazy loading, and polymorphism. My initial thoughts were that this would be another one of these fancy technical details that a developer has to deal with all the time. But after a while it grew bigger and bigger in my mind ...

We already talked often about providing design time data to your designers in Windows Presentation Foundation and in Silverlight, thus enabling them to work visually in design editors such as Expression Blend or the Visual Studio designer (codenamed Cider).

Read the rest of this entry »

I posted last year regarding a dependency management tool I was contemplating. Well, I can happily announce that I did create and launch the tool as I had envisioned it. (I just actually completed a lunch and learn today where I unveiled it to a few more people within the company) In essence, it works by spidering the BUILD environment nightly and records all dependencies from code to code, from code to database and from database to database. We have over 100 .Net solutions with multiple projects ...
I’m participating in the Microsoft Gemini CTP (Gemini is the self-service BI component cooperatively provided by the forthcoming SQL Server 2008 R2, Excel 2010 and SharePoint 2010) and the SQL Azure CTP. I found intriguing the question of whether these two CTP technologies could be used together. Turns out they can! I successfully got Gemini to import data from a SQL Azure Database (after migrating the AdventureWorksDW2008 dimCurrency table into an Azure database called AWCloud)! I set up the connection ...
A little while back I posted a question on Channel 9 wanting to know more about SQL Server ‘Madison’ project. Well Charles Torre being the extremely nice bloke that he is (Thanks Charles I owe you another beer, perhaps not London Pride next time!) got on a plane from Redmond down to Orange County and went to pay the Madison development team and in particular Christian Kleinerman for is the Product Unit Manager for the Madison development, a visit The video is a good introduction into Madison, it ...
This example shows the basic way on how to populate a data from database to a ListBox/DropDownList control using LINQ to SQL. Note that I used Northwind database here just for the simplicity of this example. To get started then let’s go ahead and add a new item in your website application in Visual Studio 2008 or VWD Express 2008. To do this, just right click on the web site -> select Add New Item -> and on the Templates select LINQ to SQL Classes as shown below and click ok: Now open up Server ...
The Regina Technology Community welcomes Nick Nastic! Topic: SQL Server 2008 R2 and project codename "Madison" SQL Server 2008 R2 is the next generation of the Microsoft SQL Server database platform, planned for release in the first half of 2010. SQL Server 2008 R2 expands on the value delivered in SQL Server 2008 to help organizations improve IT and developer efficiency with: new and enhanced tools for the management of applications and multiple servers master data services complex event processing ...
Saas vs. S+S Saas is an architectural paradigm where a solution architecture can benefit from the economies of scale of the data and behavior of that architecture being built and hosted in the cloud by a third party in a multitenant fashion. Software + Services is an architectural paradigm where a solution architecture can achieve some of the same economies of scale as Saas while simultaneously benefiting from the synergies and efficiencies of the data and behavior of that architecture being partly ...