Most of the time I find myself forgetting some simple syntax for SQL statement and I spend some time googling the correct syntax. So I thought why go google when I can just put a post in the site and keep the link handy. Here goes the first syntax
Change a column size
ALTER TABLE ALTER COLUMN
If there is a table called student and it has a column called firstname with data type as varchar(100). If we we want to change the size of the specific column then the above syntax will translate into code as
ALTER TABLE Student ALTER COLUMN FirstName VARCHAR(300) NOT NULL
Change a column name
sp_RENAME 'TableName.CurrentColumnName' , 'NewColumnName','COLUMN'
The system stored procedure sp_rename will get the job of renaming a column done for you. The syntax will translate into code as
sp_RENAME 'Student.FirstName' , 'GivenName','COLUMN'
I will keep updating this post with more SQL statements as I keep digging more.
I wanted to get started with Linux without making much of fuss with the existing windows setup I had. There are several ways that we can do this but the easiest way has to got to be Virtualization.
Virtualization is the creation of a virtual (rather than actual) version of something, such as an operating system, a server, a storage device or network resources.
These days most corporate companies use this technique to deploy multiple servers in an instant, well not in an instant really but yes at much shorter period of time as well cost. Virtualization is not just big companies to flex their muscle but also for small timers like us who can test an Operating System without a fuss. With Virtualization gone are the days where we needed to burn the OS Image onto a CD or DVD for installing the OS. Gone are the days where we peered into the screen trying to figure out what how much space needs to be partitioned in such a way that the existing partition/OS does not get affected.
I was recently was looking at NoSQL based databases for a personal project that I was working on. I did not want spend a lot of time designing the perfect database for an application which might or might not be used extensively. For this I checked out MongoDB and I had decided to go with it but while searching a database native to dotnet I saw RavenDB and felt it might be an appropriate fit for my simple application for the simple reason that RavenDB is fully written in dotnet. I downloaded the binaries for RavenDB and started playing with the db. The five main operations that we do on a database are
Adding records to the table.
Showing all records in the table.
Updating existing records in the table.
Deleting records in the table.
Searching for a specific record in the table.
In anger and agony I write this.
I am just a number on the board for people with ties to count
I exist solely to serve , they crucify me
I dance with the devil every day
They dance with the princess every day
In my infancy, promises many they showed
Showed me the shining crystals of the heaven
The beautiful damsels of the heaven
Showed me I bear the torch for the future
What I didn’t know
I was just a twig that burnt in the flame
Just like the other million twigs,
just a twig is what I am
Everyday they roast me and freeze me
They do it again and again forever and forever
Till my mortal body can bear the brunt of the pain
Just another pawn in the game, just another pawn
Played to the core, will i survive, only the time may know
Will I get out of this maze, time will only tell
Clinging to hope, I beleieve I can survive
I am carrying on braving all that the time can throw at me
This FAQ introduces you to the world of XML in DotNet. It demonstrates how to use two built-in classes in the dotnet framework for reading and writing xmls. The classes, XmlTextReader and XmlTextWriter, help you to read and write to xmls in a very simple manner.
Language : Visual Basic.Net
Framework : .Net Framework version 1 or 1.1
Imports : Continue reading
In Part 1 we touched the basic’s, now we will move to the next step.
System Defined Functions: Now the second chapter, we will deal first with some of the system-defined functions in vb. What is this “function” ? Well a function is a special type of procedure that returns a value each time it is called. A function is generally used to perform a particular task/s repeatedly when needed. Visual basic provides several built-in functions as part of the programming language, such as MsgBox, Round and so on. We can also create our functions which does a user defined task. We can pass arguments to that function and return a value also based on the parameters. There are 4 types of functions in Visual Basic and they are as follows Continue reading
I’ve seen couple of posts in the site where people have like asked the basic questions about VB. For instance, is there a need to declare a variable and what is the use of a module and so on. So this is tutorial is first of the series that I am writing. Now I will go for some bookish definition of VB.
General Information on Visual Basic 6.0
Visual Basic 6.0 is RAD tool. RAD means Rapid Application Development Tool. It is very easy to create a Data-Entry Form using VB. If it takes a 6 months for you to create a C++ application, it will take only 6 minutes for you to do it in VB. VB 6.0 has many powerful features that are required in today’s programming environment. Some of them are as follows Continue reading
A lot of times, i have felt I have worked more than my body can handle but when I took toll of the tasks, it seems most of them were not completed or was in a very bad state. I was not sure where I was going wrong, I had a fair idea that my browsing was causing some damage to my time management but I was not sure as to how much damage it was causing.
To rectify this, I took it upon myself to create a simple application in .Net (C#) which would keep track of time. Initially I thought, let it run in my system tray and manually enter tasks one by one and the time on which I was working on it. It was a realistic idea but not for me, like i said, my laziness was getting to me and I wanted a way to automatically start accounting for the work I do in my computer. Continue reading
While using Properties in MS CRM 4.0 one has to be careful as to which dotnet namespace you are instantiating it from. For MS CRM purposes, you need to make sure you instantiate it from Microsoft.crm.sdk and not from System.Data namespace. If you type the following code
PropertyCollection pc_Dummy = new PropertyCollection();
In the above line the word “Property Collection” will be show in Red in the Visual Studio IDE. This can be resolved using the following piece of declaration code. Continue reading
Working with Custom Entities has been a little tough on me because of the High Learning curve involved. Finally I did win over and learnt quite a bit about using these entities in custom pages. It’s actually quite simple to work with the custom entities. Here’s a piece of code which will get the custom entity into a dynamic entity for us
//Create of New information the custom entity
DynamicEntity de_Custom = new DynamicEntity();
de_Custom.Name = "CustomEntityName";
de_Custom.Properties = PropertiesCollectionObject;
TargetCreateDynamic tcd_Custom = new TargetCreateDynamic();
tcd_Custom.Entity = de_Custom; <a href="http://www.programmingfundas.com/blog/2008/11/29/working-with-custom-entites-in-ms-crm-40/#more-19" class="more-link">Continue reading <span class="meta-nav">→</span></a>