Tag | ADO.NET Posts

Introduction This article shows on how to generate a chart (a graphical representation of data) using the aspnet ReportViewer control. Basically, this report is called an rdlc file “Local Mode” which means that a report is generated at the client side and no connection established to the Sql Server Reporting Service Server. In this example, I am creating a report(chart) that would display the stock out movement. The page includes a DropDownList to allow users to filter a specific stock category that ...
It all started with an email Mohamed Hossam (AKA, Bashmohandes) sent to SilverKey Tech. (the company I work for) local office here in Egypt, referring to the article "Foundations of Functional Programming - Part 1 - B# .NET Blog". It inspired me to send few more language links: Linklist 03022008 - Dynamic programming design patterns, Erlang/C# AMQP Client, AOP - Nauman Leghari's Blog James Kovacs' Weblog - Syntactic Sugar, Compiler Candy, and Other Sweets Charlie Calvert's Community Blog : Expression ...
Introduction: This article describes on how to create a data access architecture using sqlclient objects that will returns a DataTable. It also discusses here on how to use and access a certain method in a particular class for you to manipulate the data into your codes. Please note that I am using the Northwind database here and all the codes in this article are written in C# language. STEP1: Adding a Class First, I added some folders under my App_Code folder to store some classes. This class includes ...
The new wave of web applications are built on technologies such as AJAX and Microsoft Silverlight that enable developers to build better, richer user experiences. These technologies bring a shift in how applications are organized, including a stronger separation of presentation from data. ADO.NET Data Services (also known as Project code name “Astoria”) consists of a combination of patterns and libraries that enables any data store to be exposed as a flexible data service, naturally integrating with ...
This week I gave another .NET 3.x session for the syntrawest ITClub developers in Kortrijk. 19 People from West Vlaanderen where interested in Workflow Foundation and liked my presentation. As promised to them : you can download the code of the demos here. BTW : the agenda for my next sessions : 26/02 : VS2008, ADO.NET in .NET 3.5,LINQ 22/04 : Patterns & Practices, Applicaton Blocks and Software Factories 27/05 : Rich Internet Applications with Silverlight Want to attend these events ? Drop me ...
Some early Cream from submittals: Simon of BinaryJam pointed me to a SL Image Viewer Webpart fo Sharepoint that he did last June and Michael Sync has a great-looking Silverlight Listview done using the new ADO.NET Data Service Extensions. From SilverlightCream.com: Sharepoint Silverlight Image Viewer A somewhat older article from Simon at BinaryJam building a Silverlight Viewer as a WebPart for Sharepoint. With code, so with all the SharePoint articles I'm seeing lately, this could be very useful! ...
Video Interview with Flash Guru Jesse Warden, Tim Heuer discusses issues surrounding moving files around in build folders, Steven Smith takes aim at Hyperlinks in SL 1.0, Shawn Wildermuth gives a workaround to some problems with the SL Template, Mike Taulty has a good ADO.NET/SL WebCase, and Michael Palermo has 2 WebCasts dealing with debugging SL and ErrorHandling in SL. From SilverlightCream.com: A Flash Guru Talks about Silverlight Jesse Warden, a hard-core flash designer met with the MS folks ...
If you were playing with the early bits of Microsoft Codename 'Astoria' MIX 2007 CTP you would have really loved the power of Data Services. Well, with ASP.NET 3.5 Extensions, ADO.NET Data Services (formerly 'Astoria') is built-in and while trying to install ASP.NET 3.5 Extensions it would prompt you to uninstall earlier bits of 'Astoria'. I had installed very early bits of Astoria and there was 3.3 GB Size CTP lying in my "Add/Remove Programs" . When I tried to uninstall the same, it would end up ...
I promised some people to post the slidedecks of my last 2 seminars for the syntrawest ITClub. 1. Agile Development met Visual Studio Team System 2. Windows Communication Foundation See you on the next seminars : 22/01 Workflow Foundation 26/02 LINQ + ADO.NET Entity framework 22/04 Rich Internet Applications with SilverLight ...
The much-talked about MVC Framework that Microsoft is working on was released last week as part of the ASP.NET 3.5 Extensions. It also has some other pretty cool stuff, including Dynamic Data controls, Ajax history support, ADO.NET Data Services, updated support for Silverlight and the ADO.NET Entity Framework. Once you download it, here are some great resources to check out: Scott Guthrie's 4 part tutorial on building an MVC based application Phil Haack (the PM for the MVC Framework) Rob Conery ...

I am starting a new screencast series for ADO.NET beginners. In this first part I will explain how to connect to the SQL SERVER database and populate a DataSet which is later displayed on the screen using the GridView control.

Creating Database Connection and Displaying Data Using DataSet

You can now download a version of the ADO.NET Entity Framework that works with VS 2008 RTM: http://www.microsoft.com/do... And don't miss this little note: "Be sure to download the Entity Framework Tools December 2007 CTP as well for integration with Visual Studio 2008." ...
Now that Visual Studio 2008 and .NET 3.5 have officially shipped, it's time to start looking at the additional products and tools that build on top of that foundation. Scott Guthrie has an excellent post that details the roadmap for the Web related products. The biggest announcement is that the ASP.NET 3.5 Extensions will have it's first public preview available sometime next week. If you don't know what the ASP.NET 3.5 Extensions are, here is the list (taken from Scott's post): ASP.NET MVC: This ...
March 5 - 7, 2008The VenetianResort Hotel CasinoLas Vegas, Nevada Now in its third year, MIX is an intimate opportunity for cutting-edge technical, creative and business strategists to engage Microsoft in a conversation about the future of the web. Come explore the latest wave of opportunities and help redefine the boundaries between: content and commerce, PC and TV, Windows and the Web. The conference focuses mostly on Web technologies, such as Silverlight, but will also cover some of the desktop ...
My second day of the conference was a mixture of different topics, from distributed application architecture, over database features to the new C# features. DAT202 - The Next Release of Microsoft SQL Server: Overview of SQL Server 2008, Francois Ajenstat There have been serveral new features presented in this session: new data types : filestream, datetime2 support für spatial applications (geometry/geography support) with a cool demo using virtual earth ado.net entity framework (object/relational ...
Check this out at Scotts Blog: source: http://weblogs.asp.net/scot... Releasing the Source Code for the .NET Framework Libraries One of the things my team has been working to enable has been the ability for .NET developers to download and browse the source code of the .NET Framework libraries, and to easily enable debugging support in them. Today I'm excited to announce that we'll be providing this with the .NET 3.5 ...
I had a complicate (and buggy) T-SQLstored procedure, that concatenate fields from details table and show them as one field in the resultset of the main table(Itinerary and summary of itinerary items. I've looked in pivot functionality, but didn't fint how to make it working in the way I needed. Furthermore, Pivot is available for SQL Server DB with compatibility level 90(aka SQL server 2005), but our db still has compatibility level 80(aka SQL server 2000). So I desided to write UDF to concatenate ...
Our system started to get intermittent errors like the foolowing in the code that was NOT changed recently: System.InvalidOperationExce... This SqlTransaction has completed; it is no longer usable. at System.Data.SqlClient.SqlTr... at System.Data.SqlClient.SqlTr... I was pointed to MS Kb http://support.microsoft.co... that I've installed, but it didn't change -errors still appeared. Unfortunately, the KB doesn't have a list of changed files and their ...
C# 3.0 Lambda Expressions play an integral part of making the LINQ framework work. Outside of LINQ it is recommended that they be used sparingly because they are less "discoverable." However, there are a couple of nice scenarios where extension methods have good potential to make your code more elegant as a stand-alone language enhancement. Take an example where you have a nullable value in the database and you represent this as a Nullable<DateTime> on your C# object (e.g., EmploymentEndDate). ...
Two months ago, after listening to .NET Rocks! show with Daniel Simmons, I was really curious to learn more about ADO.NET Entity Framework (EF). As part of my learning I was ready to write a tutorial on how to get started with this framework. However there were no tools available at the time and with instructions on how to manually edit XML files the article turned very long, and quite frankly looked very boring. Hence I decided to postpone publishing it and wait for the tools to came out. This week ...
Today, the ADO.NET team announced the release of the long awaited Entity Framework Beta 2 and the NEW Entity Framework Tools CTP1. More information about both releases, and the features that have been included and/or improved for this release, is available on the ADO.NET Team Blog ...
Anything that can be done with ADO.NET is possible in PowerShell through a call to Assembly::Load and the New-Object cmdLet, but that doesn't mean that the resulting code will seem very shell-like or practical. Two approaches to database access that definitely do seem compelling to me, however, are the sample SQL Provider recently demoed by the PowerShell team and Dan Sullivan's PowerSMO script, which is really just a thin wrapper around the SQL Management Objects found in the Microsoft.SqlServer.Managem... ...
I don't know why this site changed it's good ol' name from The Daily WTF to "politically correct" WorseThanFailure but I wouldn't do it in my case. I happen to perform code reviews on Java to .Net migration recently and in both I find enough "programming pearls" to keep me saying WTF every day for weeks. I thought about posting some of them and sharing the link with creators of such masterpieces as I may guess who's behind. They might get angry at me but it's for good to let them learn from their ...
Another book! I and some friends just finished a new release of our Visual Basic book. This is another book I wrote with the wonderful Kent Sharkey! :) We really cleaned up this version of the book. This book came together quite well and shows not only the core of .NET 2.0 in depth - but it also covers the new ground of .NET 3.0. The .NET Framework 3.0 includes the Windows Presentation Foundation (WPF), the Windows Workflow Foundation (WF), and the Windows Communication Foundation (WCF). The table ...
In my last blog we saw Microsoft LINQ and its LINQ to Object part and we also saw some small code snippet of LINQ to Object. One thing that I feel if you want to superior command on LINQ so you must have a good understanding of Anonymous types, Extension methods, Lambda expressions and Expression trees all are new feature of C# 3.0. Today I write small code snippet that use LINQ to SQL (formerly Dlinq). Before LINQ I use pure ADO.Net classes to write code that brings my required data. // Specify ...
I have the ASP.Net application, that uses SqlTransaction.BeginTransac... before the call to Update SP and commit after the call.If any exception would happened, transaction should be Rollback. The code snippet is the following: conn.Open(); using (SqlTransaction trans = conn.BeginTransaction()) { try { ds = SqlHelper.ExecuteDataset(tr... CommandType.StoredProcedure, SPName); trans.Commit(); } catch (Exception ex) { trans.Rollback(); //Log the error } } We noticed that during update of web.config ...
Microsoft Babies Microsoft new baby yes I am talking about LINQ stand for Language-Integrated Query is now available as a integral part of Visual Studio Orcas. Microsoft releases the new Visual Studio with the name of Orcas and all Microsoft previous efforts (Windows Communication Foundation WCF, Windows Workflow Foundation WWF, Windows Presentation Foundation WPF, Windows CardSpace and LINQ) are integrated in this Studio. From last one and half years Anders Hejlsberg team done a tremendous job in ...
Almost as common as the debate over which .NET language to choose is the argument about whether to use DataSets or not. As described above, typed data sets are easy to generate through the designer, provide a type safe API for containing business entity data, and already support advanced features such as change tracking, sorting, filtering, and searching. Some of the resistance to DataSets resulted from several performance shortcomings in the .NET 1.1 implementations. These problems included poor ...
I am working on a huge application where the business components are in COM-ATL and the data access is thru ADO to SQL. We are having major scalability issues with huge user connections and then it was time to see whether are we using the ADO pooling in the right way. But to my surprise I noted that there is no way to monitor the ADO pool and its performance. 1. You cannot set the max pool size. 2. There is no way to disable the pooling 3. You cannot know whether non-pooled connections are happening ...
A few months ago, Channel 9 began a new show, WM_IN, that focuses on talking with successful women who work at microsoft. There have been a number of really interesting interviews since the show has begun. I've always found it very interesting to find out how other women got into Computer Science (I guess that what happens when there are so few of you). On tuesday, a new episode was released featuring two of my Data Programmability colleagues, Kati Iceva and Sarah Parra, who are both developers on ...
The Microsoft Enterprise Library for .NET, whether for 1.1 or 2.0, is a good thing in general. The Data Access application block definitely adds value, but there are things that aren't clear. One of those things is how to properly use transactions with it. The way you could use transactions with ADO.NET 2.0 doesn't seem to properly work, depending on how your doing it, with the Enterprise Library. This can give you the error "Transaction object not associated with Connection Object", at which point ...
XML Schema And ASP.NET (1) Visual Studio provides 2 templates for XML schema, one is XML Schema, and another one is Data Set. Then when directly use XML Schema template? And when Data Set one? As we’ve known, an XML schema is used to describe the data contained in XML file(s). XML Schema template generates a file for creating a schema for XML documents; Data Set does a file for creating an XML schema with DataSet classes. DataSet is a component of the ADO.NET architecture, and it is one of the most ...
I am currently working or a project that, like many projects has many sets of code values. Some examples of code values in the project that I am working on would be Call Results, Degree Types, or Genders. On the UI of this project these are (generally) represented as drop down lists. In order to create a more consistent development environment, I decided to create a CodeDropDownList. This is a custom control, extending a System.Web.UI.WebControls.D... that has one extra parameter: CodeName. ...
Talking with Microsoft, I learned of some of the additions they are making for .NET Orcas (due at the end of this year). I am investing quite heavily into Windows Forms projects here at my company; therefore this environment is quite important to what I am doing here. Some of the highly touted items that are being added to Windows Forms are a lot of WPF interoperability items. This was announced at last year's TechEd, but the idea is that you will be able to host WPF controls directly inside of a ...
Private Sub GetXSLT() Try Dim parms As Specialized.HybridDictionary = New Specialized.HybridDictionary Dim df As New DataFactory Dim dataset As DataSet = df.GetDataSet("storedProc_G... parms) '--------------------------... 'Get the primary key column from the master table '--------------------------... Dim primarykey As DataColumn = dataset.Tables("Table").Col... '--------------------------... ...
This is a rewrite of a post to microsoft.public.dotnet.fra... I'm having a discussion with my team leader concerning the use of SqlTransactions. We work on an ASP.Net 1.1 website. Up until now we've been using ADO.Net SqlTransactions in our business logic layer to combine several data access layer method calls into one coherent, atomic action. I am in favor of this approach as it supports isolating the business logic from the database and provides for greater code readability. My team ...
I've been sitting on this post for a long time... I just read a post by Chris Williams about a technical interview he conducted today. It is very funny and it has inspired me to write this. Now I have been on both sides of the fence in a technical interview as both the interviewer and the interviewed. I really hate this process from all sides. Obviously as an employer you need to figure out what somebody knows and if they are qualified for your job. As a candidate you want to put your best foot forward. ...
A recent SSIS project which involved data retrieval from Firebird SQL to SQLServer 2005 prompted me this post on the differences between ODBC and OLEDB. At this time of writing, there's very little information on how SSIS can import information from a Firebird SQL database in the internet, at least too little for me. Before finally deciding on using OLEDB adaptors to connect to Firebird for direct data import, there were some other considerations, like consuming Webservices with a Firebird .Net Provider ...
This is available on www.programmersheaven.com site. This book is free and available online. Chapters Introduction C# Language Fundamentals Classes and Objects Inheritance & Polymorphism Structures, Enumeration, Garbage Collection & Nested Classes Abstract Classes & Interfaces Arrays, Collections & String Manipulation Exception Handling Delegates & Events WinForms & Windows Applications More Windows Controls & Standard Dialog Boxes Data Access using ADO.Net Multithreading ...
Beyond all the basic filtering available in Fetch methods and collection filtering, SubSonic also provides a way to dynamically build SQL queries. To get started, create a new Query object, using the CreateQuery method. SubSonic.Query query = Product.CreateQuery(); or pass it the table name SubSonic.Query query = new SubSonic.Query(product.Tabl... or pass it the table schema SubSonic.Query query = new SubSonic.Query(Product.GetT... The last option will prevent SubSonic from loading ...
Auto generated classes may expose a simple object based interface, but below the surface the data is being held in ADO.NET DataTables. SubSonic exposes a few methods that allow you to get at the underlying structure. The TableName property returns the name of the actual table associated with the object. product.TableName; The static class method GetTableSchema returns the underlying table. SubSonic.TableSchema.Table tableSchema = Product.GetTableSchema(); Note: There is also a static property Schema ...
The inaugural blog post (http://blogs.msdn.com/elis... I recently made a fairly drastic career jump away from Small Business Technical Evangelism and Technical Presenting... and I started a new job for the first time in a Microsoft Product Group as a Community Program Manager with the SQL Data Programmability(DP) team. I am loving the fact that I'm not traveling every week, and I get to spend my time immersed in the Developer Community, which I have to say I didn't think I would miss ...
Reading all these is essential for all .Net Developers. source: http://msdn.microsoft.com/l... Part I, Introduction to Engineering for Performance This part shows you how to apply performance considerations throughout your application life cycle and introduces fundamental performance and scalability concepts and terminology. Part I includes one chapter: Chapter 1, "Fundamentals of Engineering for Performance" Part II, Designing for Performance ...
In three tier architecture when BL class calls DAL to retrieve data from the DB we are having two options to get these data one is DataSet/DataTable and another one is DTOs (Data Transfer Objects). DTOs are classes which mapped to the DB tables. For example if Category table in Db having fields ID, Name and Description in this case DTO class will only have three properties named ID, Name and Description. DataSet also having two options one is typed Dataset and another one is untyped dataset. We will ...
1) Application-wide registration of custom controls. One of my biggest complaints about custom controls (and this was true of both UserControls and custom controls from a custom assembly) was that you had to put a “” directive at the top of every .aspx page from which you wanted to declare an instance of the control. One of the main purposes of custom controls was to be able to use them from multiple .aspx pages in one application. Since controls typically encapsulate elements like menus, ...
Call me an anti-java, oracle biggot, but these technologies are driving me crazy. First, Oracle's licensing plans are EXPENSIVE and COMPLEX. As updated January 11th, they now consider different hardware platforms cores to rate at different levels. For example, AMD/Intel cores are rated at .50 of a processor. Have a four core chip? You need two oracle processor licenses, and depending on the version of db you get, that means big bucks ($40,000 per processor for the enterprise version, YIKES!). DB2 ...
I am developing Pocket PC application at the moment and I use SQL Server 2005 Everywhere inside. I encountered some difference to other ADO.NET providers. The difference is in adding SqlCeParameter programmatically to a SqlCeCommand. Here is the code I had:SqlCeCommand select = new SqlCeCommand("select Version from Customer where ID = @id", connection);select.Paramete... System.Data.SqlDbType.BigIn... = id;object result = select.ExecuteScalar(); You can see that in the query there is ...
I blogged previously about the ADO.NET Entity Framework Overview whitepaper. Now you can download a CTP to play with. Note that these features will NOT be in ADO.NET 3.0. This is in some future version. This is a very early CTP and is extremely limited. The “ADO.NET vNext Entity Data Model Designer Prototype CTP” enables developers to design their data access stack using a designer in Visual Studio.This is an unsupported tool that showcases upcoming ideas for ADO.NET vNext tooling and Visual Studio ...
In ADO.NET 2.0 DataTable is come up with Load method which takes IDataReader as a parameter. If datatable is already contains the rows the incoming data from the datasource merged with the existing rows. http://msdn2.microsoft.com/... Cheers Mahesh maheshsingh21@hotmail.com ASP.NET Interview Questions | C# Interview Questions | .NET Interview Questions | Dot Net Interview Questions | VB.NET Interview Questions | Oracle Interview Questions ...
One cool thing about Crystal Reports is that you can easily configure it to use your custom made strongly typed dataset. All you need to do is to create your dataset and use the Crystal Report "Database Expert" option to assign the source as ADO.NET DataSets. And finally you will need to populate the dataset in your C# code. protected void Btn_DisplayReport(object sender, EventArgs e) { UserDataSet user = new UserDataSet(); SqlConnection myConnection = new SqlConnection(Configuration... ...