Tag | ADO.NET Posts

This post is in continuation with my earlier post, so you may want to read that first before continuing. Once I removed all the TasksController files and the TodoItem, I chose the Models folder, right click and “Add New Item” and searched for “ADO.NET Entity Model” and added it to the folder. It allowed me to connect to the Northwind database through “Generate from database” and I selected just three tables “Products”, “Categories” and “Suppliers” table for simplicity. At the end of the wizard, we ...
Single Page Application Frameworks are gaining popularity in the ever evolving web community with lot of libraries such as JavaScriptMVC, Backbonejs and many other libraries. ASP.NET MVC 4 introduces experimental support for building single page application (SPA) through a template. Much of the plumbing work of wiring up the client side scripts, javascript modelviews and the controllers is automated, making it a quick start to develop SPAs relatively easier. Lets examine a scenario where we are building ...
I have seen a number of questions lately regarding how SQL Azure handles throttling and how to determine why the throttling occurred. Sometimes those questions are followed by another question asking how to handle throttling conditions in their applications. Troubleshooting SQL Azure Throttling GREAT NEWS! There actually is a way to find out if you are throttled and why, and the results of the throttling. The key is to look at the error message coming back to you. You’ll typically see an error message ...
So you have started using DevExpress XPO/XAF and now you would like to see how to use the EDMX (Entity Data Model XML) visual designer within Visual Studio to draw your entities and relationships. First let’s explain the steps we are going to do and what is taking place, then I’ll give you the steps to accomplish this. The EDMX design surface is what is currently being used to generate Entity Framework code. What we have done is to intercept the saving of the diagram and use this to generate XPO/XAF ...
At the beginning I want to inform that I've already read the similar question here: Entity Framework 4.0: is it worthy now? but it does not answer my questions and doubts concerning EF 4.0. Here's the case: We are working on a quite big project written in WPF and WCF. The structure of the database contains about 60 tables, lots of stored procedures, views and some functions. We are not using any ORM at the moment. Some time ago when the first version of EF was release we did not go with it because ...
Wijmo is an awesome tool from ComponentOne. The goal of this tool is to help us web developers rapidly develop MVC applications with interfaces richer than WebForms. Main Features: 1.Over 30 UI Widgets with everything from interactive menus to rich charts. 2.MVC scaffolding automation. This means that Wijmo generates rich interactive Views and Controllers for your entire Model. Free Trial DownLoad: http://www.componentone.com... In this review we'll take a look at Wijmo ...
The Microsoft SQL Server team has been interacting on a regular basis with developers and users in the form of surveys. If you have 15mins spare and would like to do your bit to help shape the roadmap for SQL Server then please pop over to http://www.zoomerang.com/Su... And… My own simple one question version if you only have one minute to spare. Apologies in advance for stuff I left out! Related Links: More details of the survey are posted on the ADO.NET team blog ...
At http://peterkellner.net/200... there is a very useful article by my fellow MVP Peter Kellner. This shows that ADO.NET is very much faster than LINQ to SQL unless the latter is compiled. Whilst there may be some cases where Linq to SQL offers genuine benefits, however we should proceed with caution in using Linq unless it a some single use form of query. I suggest after reading Peter's post you leave a note of appreciation for ...
After reading DLinq (Linq to SQL) Performance and in particular Part 4 I had a few questions. If CompiledQuery.Compile gives so much benefits, why not to do it for all Linq To Sql queries? Is any essential disadvantages of compiling all select queries? What are conditions, when compiling makes whose performance, for how much percentage? World be good to have default on application config level or on DBML level to specify are all select queries to be compiled? And the same questions about Entity Framework ...
I’m starting to see a whole bunch of tweets and blog posts on how Silverlight/WPF is dead, or how the XAML team has been disbanded at Microsoft, or how someone predicted Silverlight would die, blah blah blah. They all have a similar ring to it though: “Told ya so!” “They were stupid ideas anyway!” “Serves Microsoft right, boy are they dumb!” Let me tell you something, all those that are gleefully raving about Silverlight/WPF’s demise are nothing more than death trolls. Let’s assume that everything ...
The chances are pretty high that you are creating a multi-tiered application with a solution that may be calling several different projects, one of which is the ADO.NET Entity Framework DAO-layer. In order for the entity frame work to work outside the immediate project that its been created under, you'll have to import the connection string built by the EF wizard at create time to your other project's application or web config file. Here's an example. I have two projects under a single solution, ...
MVC 3 is becoming hugely popular thanks to Razor and the Helpers that make building web applications much easier. One of the common requirements in web development, both with web forms as well as MVC based development, is the cascading dropdownlist. Now, for Web Forms, we can use a variety of options viz. server side programming, jQuery or using the AJAX Control Toolkit’s cascading dropdownlist control for accomplishing this. I saw a few samples on the internet that used the erstwhile Microsoft AJAX ...
In this article I'm going to demonstrate how to create a simple sign-up form using ASP.NET MVC 3. So basically in this demo you will learn the following: How to insert data to the database with Entity Framework How to validate the Form using Data Annotations How to Authenticate users after sign up using FormsAuthentication Note that before you continue reading this article be sure that you have the basic understanding about ASP.NET MVC in general. You can refer the following links below to learn ...
PREREQUISITES DEVELOPPMENT TOOL In this tutorial, component that follow is required and need to be install: Visual Studio 2010 Express ADO.NET Entity Framework 3.5/4.0 Microsoft Silverlight 4 Tools for visual Studio 2010 that include all components necessary for silverlight 4: Silverlight 4 developper runtime, silverlight 4 SDK, silverlight 4 tools for visual studion 2010. Please, to download it, please refer to this link. INTRODUCTION This topic explain in the simple way how to display data from ...
I have an utility, that reads a CSV files into ADO.Net , modifies it and Saves as another .CSV file. Unfortunately Microsoft.Jet.OLEDB provider corrupts some string column, incorrectly interpreting them as decimals. Thanks to the article http://www.aspdotnetcodes.c... I was able to specify schemaIni before reading the file using the function public static void SaveSchemaIni(string path, string schemaIniContent) { FileInfo fileinfo = new FileInfo(path); string ...
Let’s focus on Exam 70-516 this time. This exam is TS: Accessing Data with Microsoft .NET Framework 4. Additional Resources: http://msdn.microsoft.com/e... The exam objectives are: Modeling Data Map entities and relationships by using the Entity Data Model http://msdn.microsoft.com/e... http://msdn.microsoft.com/e... http://msdn.microsoft.com/e... Map entities and relationships by using LINQ to SQL http://msdn.microsoft.com/e... ...
Here’s a quick start introduction to the ADO.NET Entity Framework Code First Development Pattern. For a more complete (but still intro) walkthrough, check out ScottGu’s blog. At the time of this writing, you’ll need the EF 4.1 Release Candidate. After EF 4.1 is released you’ll no doubt be able to find it on the ADO.NET team blog. 1. Create a new empty ASP.NET MVC2 Web Application, add a reference to System.Data.Entity. If using the EF4.1 RC - add a reference to the EntityFramework dll that comes ...
Few months ago I wrote a series of articles regarding how to Insert, Update, Fetch and Delete data in the form using LINQ to SQL. You can view the series of articles below: Inserting Data to Database using LINQ to SQL Fetching Data from Database and Populating fields in the Form using LINQ to SQL Editing, Updating and Deleting Data in the Form using LINQ to SQL In this article I'm going to demonstrate the basics on how to work with MS Entity Framework. Basically in this part I'm going to show you ...
UPDATE: Scott Hanselman has a NuGet package to automate many of these steps and you should check it out, http://www.hanselman.com/bl... Today, at Tech Ed India 2011, I delivered this session – Web Forms vs. MVC choosing the right one for web development. Although its a tricky topic, it was worth clarifying some of the patterns to decide between Web Forms and MVC. One of the demo scenarios I took ...
It’s about 3 months later when I registered the SQL Azure Reporting CTP on the Microsoft Connect after TechED 2010 China. Today when I checked my mailbox I found that the SQL Azure team had just accepted my request and sent the activation code over to me. So let’s have a look on the new SQL Azure Reporting. Concept The SQL Azure Reporting provides cloud-based reporting as a service, built on SQL Server Reporting Services and SQL Azure technologies. Cloud-based reporting solutions such as SQL Azure ...
A few months ago myself and colleagues had open sourced the BizTalk Data Services. We were meanwhile working on other artifacts which comes along with BizTalk Server like the “Business Rules Engine”. We are happy to announce the first version of BRE Data Services. BRE Data Services is a same concept which we covered through BTS Data Services, providing a RESTFul OData – based API to interact with the Business Rules Engine via HTTP using ATOM Publishing Protocol or JSON as the encoding mechanism. ...
Many of my clients are actively using Silverlight 4 and RIA Services to build powerful line of business applications. Getting things set up correctly is critical to being to being able to take full advantage of the RIA services plumbing and when developers struggle with the setup they tend to shy away from the solution as a whole. I’m a big proponent of RIA services and wanted to take the opportunity to share some of my experiences in setting up these types of projects. In late 2010 I presented a ...
Few months ago I wrote an example about Dynamically Adding TextBox Control to ASPNET Table. As a recap that example demonstrate how to generate rows of TextBoxes in a Table control based on the number of rows and number of columns provided and as well as print the values entered by the user using the Request.Forms collections.. Recently,one of the user is asking if how are we going to accomplish the same thing by generating the TextBox in the Table based on the data from the database. So in this ...
Few weeks ago I was working with a small internal project that involves importing CSV file to Sql Server database and thought I'd share the simple implementation that I did on the project. In this post I will demonstrate how to upload and import CSV file to SQL Server database. As some may have already know, importing CSV file to SQL Server is easy and simple but difficulties arise when the CSV file contains, many columns with different data types. Basically, the provider cannot differentiate data ...
Quick resolution: Give full permission to AUTHENTICATED USERS in following folders. a) ORACLE_HOME b) Program Files\ORACLE Check your PATH. You might have installed different clients in your system and your .NET application is pointing to a home with inappoperiate client. What your .NET application should load is OCI.DLL with File version more than 8.1.7. According to the MSDN document Oracle and ADO.NET: "The .NET Framework Data Provider for Oracle provides access to an Oracle database using the ...
In my previous post here we've talked about how to calculate the sub-totals and grand total in GridView using JavaScript. In this post I'm going take more step further and will demonstrate how are we going to format the totals into a currency and how to validate the input that would only allow you to enter a whole number in the quantity TextBox. Here are the code blocks below: ASPX Source: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... ...
SharePoint Installation in Windows 7 or Vista is not same as Windows Server 2008. You might have difficulties if you do not follow the proper steps. Here i have been tried to explain how to install SharePoint 2010 on Windows 7 or Vista and configure it. Assume, Installed OS Windows 7 x64 (as you may already know SP only support 64-bit OS) and Windows update Install SQL Server 2008 Install SharePoint 2010 You can install SharePoint using the following steps A. Install software prerequisites 1. Install ...
All-In-One Data Platform Code Samples Introduction Download Data Platform code samples Request Data Platform code samples Introduction The All-In-One Data Platform code samples demonstrate the typical programming topics about ADO.NET, Entity Framework, WCF Data Services, ADO, and other Data Platform technologies. These topics are either frequently asked in MSDN forums and Microsoft Support, or are requested by many developers via our code sample request function. We want to alleviate the frustration ...
Our SQL Azure book is finally done! After months of work, research (and waiting for Service Updates ) the book is finally finished. We spent a lot of time on this book, and we wanted to let you know it is out and ready for reading. It should be available on Amazon and other sites know. For topics, we cover the following: Getting Started with SQL Azure SQL Azure Design Considerations Setting up and Configuring your SQL Azure Environment Security Data Migration and Backup Strategy Programming SQL Azure ...
Our West Palm Beach .Net User Group will be honored to have Scott Klein, Microsoft MVP and Author of Pro. SQL Azure (APRESS) as our October speaker. Scott will be talking and answering all our questions about Azure. Time has never been better for our Fladotnet West Palm Beach .Net User Group. We are fortunate to have a free meeting location offered to us by CompTec and to enjoy the backing and sponsorship of many top notch companies. This support is enabling us to uphold our founders’ vision: Create ...
You’ve heard good things about Visual Studio 2010 but you still need to answer the question “What’s in it for me?” You need to justify the cost the new software as well as the not insignificant cost of migration. The Entity Framework is a powerful tool for creating a conceptual model of your data store and abstract away the details of data access. Exposing these conceptual entities over the wire to client applications mean one of two things: ADO.NET Data Services (now called WCF Data Services) or ...
Thanks to all of you who attended my session at STL Day of Dotnet. Hopefully you found it useful. You may find a copy of my presentation here: http://www.slideshare.net/k... I hope to create some follow up blog entries on this topic but in the meantime, you may download the sample project here I have also included the script I used to build the demo. New Project - Silverlight Business Application AdventureWorksHR @ C:\Code Projects\DayOfDotNet2010\ Build and Run. ...
Microsoft Silverlight 4 Step by Step (click book logo to be taken to the Catalog Page) By: Laurence Moroney Publisher: Microsoft Press Pub. Date: June 30, 2010 Print ISBN-13: 978-0-7356-3887-7 Pages in Print Edition: 336 I decided to do my first review with the new Silverlight 4 Step by Step book from Microsoft Press. I have read the entire book and completed all of the exercises. I have found several errors in the book’s code, but they were not hard to figure out. Instead of writing a formal book ...
ODATA enables the creation of RESTful based data services that allow resources identified using URL and defined in a data model to be published and edited by web clients using HTTP messages. OData is the web-based equivalent of ODBC, OLEDB, ADO.NET and JDBC. As more data-oriented web APIs come online, each team responsible for the design of each web API is confronted by the same kinds of questions, and each team answers these in their own particular way Increasingly, “RESTful” is a design goal of ...
In this Issue: Joseph Cooney, Matthias Shapiro, Ramani Sandeep, Andy Wigley(-2-), Chris Rouw, Michael Washington, Brian Noyes, Roger Peters, Sergey Barskiy, Timmy Kokke, and Phil Middlemiss. Shoutout: Koen Zwikstra announced Document Toolkit 2 Beta 2 available Rob Eisenberg announced Caliburn v1.1 Released! I missed this post by Andy Wigley of his material from TechEd: Programming Silverlight for Windows Embedded from .NET I hope you didn't miss the release of the Silverlight PivotViewer Control ...
OK. I admit it. The last post I hade mentioned that we moved the XAF DSL to the Entity Framework. This has caused a lot of confusion. I meant to say that we have used the ADO.NET Entity Data Model extensions. This is the design surface that can be tailored to create Entity Framework. We leveraged the code generation within the ADO.NET Entity Data Model (EDMX) file to generate XAF/XPO classes. This allows you to visually create the entity model, set a few XAF properties and then generate the business ...
short answer: Quite probably, as SQL Azure is very similar to SQL Server longer answer: Object Relational Mappers (ORMs) that work with SQL Server are likely but not guaranteed to work with SQL Azure. The differences between the RDBMS versions are small – but may cause problems, for example in tools used to create the mapping between objects and tables or in generated SQL from the ORM which expects “certain things” :-) More specifically: ADO.NET Entity Framework / LINQ to Entities can be used with ...
The .NET Framework version 4 includes enhancements for ASP.NET 4 in targeted areas. Visual Studio 2010 and Microsoft Visual Web Developer Express also include enhancements and new features for improved Web development. This document provides an overview of many of the new features that are included in the upcoming release. This topic contains the following sections: ASP.NET Core Services ASP.NET Web Forms ASP.NET MVC Dynamic Data ASP.NET Chart Control Visual Web Developer Enhancements Web Application ...
When working with ADO.NET Entity Data Model, its often common that we generate entity schema for more than a single table from our Database. With Entity Model generation automated by Visual Studio, it becomes even more tempting to create and work with entity models to achieve an object mapping relationship. One of the errors that you might hit while trying to update an entity set either programmatically using context.SaveChanges or while using the automatic insert/update code generated by GridView ...
My two latest books are out! Professional ASP.NET 4 in C# and VB Professional C# 4 and .NET 4 From the back covers: Take your web development to the next level using ASP.NET 4 ASP.NET is about making you as productive as possible when building fast and secure web applications. Each release of ASP.NET gets better and removes a lot of the tedious code that you previously needed to put in place, making common ASP.NET tasks easier. With this book, an unparalleled team of authors walks you through the ...
Ever since we’ve been using Data we’ve been religious. Religious about the way we represent it and equally religious about the way we access it. Be it plain old SQL, DAO, ADO, ADO.Net and I am just referring to religions in MSFT world. A peek outside and I’d need a separate book to list out the Data faiths. Various application areas in networked computing are converging under the HTTP umbrella with a plausible transition to purist HTTP and in turn REST fuelled by the Web2.0 storm. It was time the ...
I have been working on a few client app projects in my spare time that need to persist small amounts of data and have been looking for an easy to use embedded database. I really like db4o but I'm not wanting to open source this particular project so it was not an option. Then I remembered that there was an ADO.NET provider for sqlite. Being a fan of sqlite in general, I downloaded it and gave it an install. The installer added tooling support for both Visual Studio 2008 & 2010 which is nice because ...
MIX day 1’s keynote was all about Windows Phone 7 (WP7). MIX day 2’s was a reminder that Microsoft has much more going on than a new mobile platform. Steven Sinofsky, Scott Guthrie, Doug Purdy and others showed us lots of other good things coming from Microsoft, mostly in the developer stack, that we certainly shouldn’t overlook. These included the forthcoming IE9, its new JavaScript compiling engine and support for HTML 5 that takes full advantage of the local PC resources, including the Graphics ...
In my last post I created a very simple WCF service with the user registration functionality. I created an entity for the user data and a DataContext class which provides some methods for operating the entities such as add, delete, etc. And in the service method I utilized it to add a new entity into the table service. But I didn’t have any validation before registering which is not acceptable in a real project. So in this post I would firstly add some validation before perform the data creation ...
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 ...
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, ...
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 ...
Liveside.net and Mary Jo Foley are reporting that rumors of Live Mesh’s death are greatly exaggerated. That’s excellent, as far as I’m concerned. Mesh is a good product, and it would be a huge pain if I had to switch to something else were Redmond to kill it. Meanwhile, I continue to find it fascinating how many sync standards Microsoft has across its product set. Here’s a list of them (excluding Live Sync and Live Mesh), and I’m betting it’s not comprehensive. Can you think of others?: ActiveSync ...
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 ...
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 ...