Tag | SQL Posts

Last week, I was interviewed by Zandra Nilocas from Microsoft Philippines. It was my first time experience to talk about something in front of the camera so it's not surprising that I looked like an idiot in that interview (you know swiveling my chair back and forth without noticing it). Anyway in the interview we talked about ASP.NET WebForms, MVC and Web Matrix in general and just to elaborate a bit of what we talked about and to clarify things out, I have decided to write this post... WebForms ...
I am very excited to help share this news with you today! I feel as excited today as I was when Windows Phone 7 developer story was revealed at MIX10 last year. I see so many more application scenarios with the new tools and features in Windows Phone 7. There has been a few announcements made at MIX11 – let me recap some of what I find important. There was not a disclosure or showing of any new end-user features. There is a commitment to delivering the next update later this year as a free updates ...
A great benefit of using a CTE is their ability to replace some uses of Cursors. Sometimes you may need a Cursor to fetch an ID value from a table. Use that ID in a Select statement. Then fetch the next ID value, use that in the same Select statement over and over again until you ran through all the ID values. A CTE can help eliminate that and from what I can see is generally a bit faster than using a Cursor. This example is using a table to hold purchase orders (tblPO) and another table to hold ...
At http://www.devart.com/dbfor... there is an intellisence tool for SQL Server Management Studio. The express version is free and the standard is only $49.95. (See http://www.devart.com/dbfor... I intend to try this tool out ...
Thanks to everyone who attended my session at Philly Code Camp 2011.1. It was a very fun and interactive session for me, and I hope it was an informative and helpful session for you as well. I apologize for the delay in getting the presentation materials uploaded since I was busy catching up with work from last week this morning. The Database backup file (.bak) included in the zip file will have to be restored on your SQL Server. Please let me know if anything doesn't run (or) compile or you are ...
How to: Build a Windows Azure Application How to Configure Virtual Machine Sizes How to Configure Connection Strings How to Configure Operating System Versions How to Configure Local Storage Resources How to Create a Certificate for a Role How to Create a Remote Desktop Protocol File How to Define Environment Variables Before a Role Starts How to Define Input Endpoints for a Role How to Define Internal Endpoints for a Role How to Define Startup Tasks for a Role How to Encrypt a Password How to Restrict ...
In this Issue: Michael Crump, Jeremy Likness, Matthew Delisle, Xianzhong Zhu, Nigel Sampson, Jeff Prosise(-2-), Andrea Boschin, Mike Ormond, Jeff Wilcox, and Bil Simser. Above the Fold: Silverlight: "Silverlight Scaling and Anti-Aliasing Issues" Jeremy Likness WP7: "AgFx Windows Phone App and Data Caching Framework" Jeff Wilcox Shoutouts: The tool Mike Ormond discussed in a post listed below is WP7 Screenshot Tool by Cory Smith DiscountASP.NET has a post up about the latest SQL Injection attack going ...
Fellow Techies of the world.. Welcome! In this obligatory first post I want to just tell you a little about myself and what I intend to do with this blog. I’ve worked in fits and starts on a tech blog before so I’m happy to be a part of the GeeksWithBlogs community now and make it my new home. Let’s begin at the beginning… Sometime back in 1995 my dad (who has worked with computer pretty much since there have been computers) brought home 2 books. Visual Basic 4 and Visual C++ 4 (For Beginners). I ...
Transactions are a great way to perform many actions but make it appear as one unit. Always start a transaction with BEGIN TRAN. Let's take a look at these statements: 1: BEGIN TRAN 2: DELETE SCHEDULES When this code runs, SQL Server opens a transactions and tentatively deletes all records from the SCHEDULES. The records are not actually deleted until a COMMIT. When a tranmsaction starts, SQL Server places a lock on the SCHEDULES rows or the entire table. This lock will prevent other users from making ...
This is my first post, so i am not sure how to proceed. I was very anxious to post something relevant to IT community but due to work loads or a thought that everything is available on net here or there keeping me away to post. But there is always a first time . Recently when i was working on a change requirement i had to change a table data in a manner in which field data toggles. Essentially it was a production entity table like parts in a batch manufacturing. So the table contained a field [Status] ...
I am in the proccess of putting together a demo machine. i arleady have a Windows 7 VM with the essentials for SharePoint Deveopment. But I spent some part of the weekend putting together a demo machine and after some thinking I decided to share some points that you might want to consider when putting together a Development or Demo machine as a SharePoint Developer\Consultant. I also welcome any comments and opinions or rebuttles to any of these points. I spent some time and put together a WIndows ...
Previously we've talked about how to fetch the data from the database and populate the form with EF. In this example I'm going to demonstrate how to do Edit,Update and Delete operations in the form with Entity Framework. And oh since this is a continuation of my previous example I would suggest you to refer that first before you go any further. STEP 1: Setting up the UI Since this is a continuation of my previous example then I'm jus going to use the same layout and extend it a bit by adding some ...
In Part 1 we've talked about how to insert data to the database with Entity Framework. In this part I'm going to demonstrate how to fetch the data from the database and populate the form fields with Entity Framework. STEP 1: Setting up the Form To get started let's go ahead and fire-up visual studio and add a new WebForm. For the simplicity of this demo I just set up the form like this: <asp:Content ID="Content2" ContentPlaceHolderID="MainC... runat="server"> <asp:DropDownList ID="ddlUser" ...
Over the last few days I’ve been coding away with several ORMS and code generators trying to find me one which I am comfortable with. Here is what I learn Not all ORMs are perfect! SubSonic Telerik OpenAccess nHibernate via Code smith Generator and LLBLGen LLBLGen Pro Framework SubSonic This is an awesome piece of work my Mr. Conery (and team)…for FREE! I’ve been using this for quite a while now. It is excellent for small projects, both Web and Winform apps. It’s a breeze to setup and get off and ...
I'm just getting to grips with MVC linq etc etc and came across what looks like a common stumbling block. For the more experienced of you reading this please refrain from shouting "Dumbass" at me. All the tutorials are either Code First examples or they create the database from scratch in the App_Data directory. All well and good for a tutorial that need to be easily portable to the readers computer, but not very helpful when setting up a full scale MVC application. My first problem was my lack of ...
(these are lifted verbatim from Microsoft here, here and here and are presented below only because it’s convenient to have them lumped altogether…) Getting Started with Windows Phone Windows Phone development platform supports both XNA Framework and Silverlight. This unit takes you through the step-by-step creation of your first Windows Phone Silverlight application. Hands-On Labs · Hello Windows Phone This lab intends to be the classic "Hello World" application, introducing you to the tools and ...
This article is Part 2 of the series “Producing and Consuming OData in a Silverlight and Windows Phone 7 application.” Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 1) – Creating our first OData Data Source and querying data through the web browser and LinqPad. Producing and Consuming OData in a Silverlight and Windows Phone 7 application. (Part 2 ) – Consuming OData in a Silverlight Application. Producing and Consuming OData in a Silverlight and Windows Phone ...
In this Issue: Michael Wolf, Colin Eberhardt, Kunal Chowdhury, Benjamin Roux, Nigel Sampson(-2-), Jeff Prosise(-2-), Jeremy Likness, and Beth Massi. Above the Fold: Silverlight: "Useful Value Converters" Nigel Sampson WP7: "A Smarter TextBlock Control for WP7" Michael Wolf More WP7: "Metro In Motion Part #2 – ‘Peel’ Animations" Colin Eberhardt From SilverlightCream.com: A Smarter TextBlock Control for WP7 Michael Wolf's latest post is about a "Smart" textbox for WP7, meaning if it looks like a phone ...
While I have been using Linq to Object for a couple of years now I had not investigated Linq to SQL up to this point. I figured I would put together my take on this technology’s use. Linq is a wonderful syntax for navigating an object graph without having to walk the graph object by object and member by member. It is concise and compact but for someone who has never seen its syntax you would swear you went from reading English to obscure mathematic notation. If you want to learn about the general ...
Problem I noticed a new feature that was first introduced in SQL Server 2005, which is the Emergency state for a database. It looks that it may facilitate dealing with a suspect database. How can I use the Emergency state for a database effectively while working with a suspect database? Solution During a disaster recovery process, the Emergency state provides flexibility to perform several operations on a corrupt/suspect database. When a database is put in the Emergency state, it makes three major ...
I am encountering this error on a freshly installed Named Instance SQL Server 2005 "Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum) The SQL Server specified in Integration Services service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic "Configuring the Integration Services Service" in SQL Server 2008 Books Online. Login Timeout Expired An error has occurred ...
I love TSQL. Its really cool. I have switched gears and now am working an converting a large asp classic project to MVC / vb.net. Interesting. So, I am reworking the sql into a repository set of classes. As I do I need to 1) exec stored procedures to test them and 2) get a list of the parameters to setup sqlclient parameters. Item no 1 is easy. I can just use exec to fire the sproc: exec dbo.someSproc 1,20 And now to get the list of parameters: exec sp_helptext someSproc This give me the sprc in ...
While converting some MySql databases to SQL Server I ran across this function. Confused by the lack of hints to its purpose in the name I did what any red-blooded IT person would do… look it up. It turns out that this function turns the string representation of an IP address into a long integer. What good that does I am still not sure, but here is the jist of the operation. (octet1 * 256^3) + (octet2 * 256^2) + (octet3 * 256) + octet4 Simple enough, right? Now for the real question. What the heck ...
In this Issue: Ollie Riches, Damon Payne(-2-), Jesse Liberty(-2-), Shawn Wildermuth, John Papa, Beth Massi, Michael Crump, Mike Taulty(-2-), Jorge Peraza, and Peter Kuhn(-2-). Above the Fold: Silverlight: "Delay Binding Updates within a certain Context" Damon Payne Blend: "Phone Tools reaches Beta!" Shawn Wildermuth Blend: "Blend Bits 26–Use Libraries for Assemblies" Mike Taulty Shoutouts: If you're in the UK, Mike Ormond announced a new set of WP7 Workshops: New Windows Phone 7 Workshops I met Gregor ...
If you've been a loyal Reflector user, you've probably been exposed to the debacle surrounding RedGate's decision to no longer offer a free version. Since then, the race has begun for a replacement with a provider that would stand by their promises to the community. Mono has an ongoing free alternative, which has been available for a long time. However, other vendors are stepping up to the plate, with their own offerings. If Not Reflector, Then What? One of these vendors is Telerik. In their recent ...
I see various articles that proclaim means to guard against SQL injection. As individual steps they are of use but since they were often proclaimed as "the solution" they were potentially misleading. At http://www.simple-talk.com/... there is an article entitled "SQL Injection: Defense in Depth" - this article argues what I have argued myself. Remember that however low-grade the information on your web site is, if your site is hacked, the public may ...
My blog has been quiet recently, mainly because I've been spending a bunch of time putting together an iPhone app which talks to a set of RESTful WCF services hosted in Azure, backing onto SQL Azure for storage. This post is a technical walkthrough of that architecture and some of the learning experiences, but after this it will be back to normal. I have a couple of nice open-source projects which are coming soon, including a log4net appender which writes to Event Tracing for Windows (ETW), and a ...
LINQ und ArcObjects Motivation LINQ1 (language integrated query) ist eine Komponente des Microsoft .NET Frameworks seit der Version 3.5. Es erlaubt eine SQL-ähnliche Abfrage zu verschiedenen Datenquellen wie SQL, XML u.v.m. Wie auch SQL bietet LINQ dazu eine deklarative Notation der Problemlösung - d.h. man muss nicht im Detail beschreiben, wie eine Aufgabe, sondern was überhaupt zu lösen ist. Das befreit den Entwickler abfrageseitig von fehleranfälligen Iterator-Konstrukten. Ideal wäre es, natürlich ...
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-GB X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.000... ...
Photo by parl, 'Risk.’ Under Creative Commons Attribution-NonCommercial-N... License This has been a busy week for Microsoft, and for me as well. On Monday, Microsoft launched Internet Explorer 9 at South by Southwest (SXSW) in Austin, TX. That evening I flew from New York to Seattle. On Tuesday morning, Microsoft launched Visual Studio LightSwitch, Beta 2 with a Go-Live license, in Redmond, and I had the privilege of speaking at the keynote presentation where the announcement was made. Readers ...
LightSwitch Beta 2 is out. That’s how all this started. All I wanted was to install it on my MBP’s Win7 Parallels VM. But as I’m finding with running a Win7 VM on a MBP, nothing is as easy as it should be. First my MBP froze during the SP1 installation. Not my VM crashing, the entire machine freezing…no mouse, nothing. Had to do a hard reset. BLECH. Then we’re back and I try to re-install SP1 (since the first try obviously failed). I get met with a dialog asking me where silverlight_sdk.msi was. ...
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-GB X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.000... ...
I’ll be speaking at a few upcoming events: Saturday March 19th 2011 IT Camp Saturday Tampa http://itcampsaturday.com/t... This is a first of it’s kind – IT Pro camp, a more topic open then many traditional Code Camp and no so much code focused. Here is just a small sample: Adnan Cartwright Administrating your Network with Group Policy Nikita Polyakov Intro to Phone 7 Development Landon Bass Enterprise Considerations for SharePoint 2010 Michael Wells Intro to SQL Server for IT Professionals Keith ...
What is cloud computing? Is hosting the same thing as cloud computing? Are you running a cloud if you already use virtual machines? What is the difference between Infrastructure as a Service (IaaS) and a cloud provider? And the list goes on… these questions keep coming up and all try to fundamentally explain what “cloud” means relative to other concepts. At the risk of over simplification, answering these questions becomes simpler once you understand the primary foundations of cloud computing: Elasticity ...
A new release of Microsoft All-In-One Code Framework is available on March 8th. Download address: http://1code.codeplex.com/r... You can download individual code samples or browse code samples grouped by technology in the updated code sample index. If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read this Microsoft News Center article http://www.microsoft.com/pr... or watch the ...
After feeling pretty good about my deployment skills of Management Reporter for Dynamics GP a few weeks ago, I ran into two additional lessons learned that I wanted to share. First, on another new deployment, I got the error shown below which says “An error occurred while creating the database. View the installation log for additional information.” This problem initially pointed me to KB 2406948 which did not provide resolution. After several hours of troubleshooting, I found there is an issue if ...
After successfully completing several installations of Management Reporter this year, I wanted to share a few lessons learned that should help you. First, you will want to make sure that you install Management Reporter under a domain account as opposed to a local system or network service account. Management Reporter gives you the option to install under these accounts, but it is a be a best practice approach to use a domain account. Upon installation of Management Report, you will want to make sure ...
Last week I was fortunate enough to spend time in Redmond on Microsoft’s campus for the 2011 Microsoft MVP Summit. It was great to hang out with a number of old friends and get the opportunity to talk tech with the various product teams up at Microsoft. The weather wasn’t exactly sunny but Microsoft always does a great job with the Summit and everyone had a blast (heck, I even got to run the bases at SafeCo field) While much of what we saw is covered under NDA, there a ton of great things in the ...
If you are using SQL Server management Studio much the we can observer that the list of server names in the log in of it. As you can imagin a period of time after 6 month or 1 year you will see a long list of server names in the login dialog. How to clear this list...? I doesn't provide a mechanism to clean nor clear the list, so you'll have to do a little browsing through your file system. For SQl Server 2005 Management Studio, we should delete the below file C:\Documents and Settings\<user>\Appli... ...
In this Issue: Joost van Schaik, Manas Patnaik, Kevin Hoffman, Jesse Liberty, Deborah Kurata, Dhananjay Kumar, Dennis Delimarsky, Samuel Jack, Peter Kuhn, WindowsPhoneGeek, and Jfo. Above the Fold: Silverlight: "How I let the trees grow" Peter Kuhn WP7: "Simple Windows Phone 7 / Silverlight drag/flick behavior" Joost van Schaik Shoutouts: SilverlightShow has their top 5 from last week posted, plus the ECOContest is ready to be voted on: SilverlightShow for Feb 28 - March 06, 2011 Drew DeVault is ...
I was trying to change the SA password on my development server this morning and got an error. Msg 15535, Level 16, State 1, Line 1 Cannot set a credential for principal 'sa'. It was a little frustrating to get an error for a seemingly simple task but then agian maybe I screwed something up. After doing a couple of searches i found a Microsoft KB (support.microsoft.com/kb/9... "You receive an exception in SQL Server 2008 when you try to modify the properties of the SQL Server Administrator account ...
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; ...
Towards the end of 2010, Microsoft made some changes to the Microsoft Certified Master for SQL Server 2008 program. The process to certification required to have a 3 week bootcamp/course in Redmond. This has changed now. It has been mapped to 2 exams. Get information from Microsoft Learning with regards to the changes, process, resources and pricing for the certification exams. http://www.microsoft.com/le... What has happened here too, is some SQL MCM rotation ...
Using a table adapter to a SQL Server database table that returns a NULL record. We determine the fields are NULL by comparing against System.DBNull Looking the NULL records in SQL Management studio Using a table adapter to retrieve a record 1: try 2: { 3: this.vTrackingTableAdapter.... iTrkZone); 4: } 5: catch (Exception ex) 6: { 7: sLogMessage = String 8: .Format("Error getting coil number from tracking table at {0} - {1}", 9: sTrkName, 10: ex.Message); 11: throw ...
Prologue In the previous chapter we have see how to create DB records with EF, now we are going to Some Questions about Oracle. ORACLE One characteristic from SQL Server that differs from Oracle is “Identity”. To all that has not worked with SQL Server, this property, that applies to Integer Columns, lets indicate that there is auto increment columns, by that way it will be filled automatically, without writing it on the insert statement. In EF with SQL Server, the properties whose match with Identity ...
First of all, I don't know which version of SQL this post (http://www.techonthenet.co... is based on, but at least for Microsoft SQL Server 2008, the syntax is not: ALTER TABLE [table_name] MODIFY [column_name] [data_type] NOT NULL; Instead, it should be: ALTER TABLE [table_name] ALTER COLUMN [column_name] [data_type] NOT NULL; Then, as several posts point out, you can't use T-SQL to run an existing column into an IDENTITY column. Instead, use the IDENTITY_INSERT to copy ...
Billy Hollis, my Visual Studio Live! colleague and fellow Microsoft Regional Director said recently, and I am paraphrasing, that the computing world, especially on the consumer side, has shifted from one of building hardware and software that makes things possible to do, to building products and technologies that make things easy to do. Billy crystalized things perfectly, as he often does. In this new world of “easy to do,” Apple has done very well and Microsoft has struggled. In the old world, customers ...
User-Defined Functions Scalar User-Defined Function A Scalar user-defined function returns one of the scalar data types. Text, ntext, image and timestamp data types are not supported. These are the type of user-defined functions that most developers are used to in other programming languages. Table-Value User-Defined Function An Inline Table-Value user-defined function returns a table data type and is an exceptional alternative to a view as the user-defined function can pass parameters into a T-SQL ...
Database .NET is an awesome tool that allow us manage several database in simultaneous (SQL Server, MySQL, Oracle, etc). What lead me to install this tool was an problem that must be shared by must developers. Tools like SQL Server Management Studio consume to many resources, and if you don't have a decent computer you'll get problems in performance, and that's my case! With Database .NET we can access an SQL Server for example, and make several actions to database (crud operations, manage procedures, ...