Posts

Showing posts from 2010

Security : Encryption and Decryption from and to a string

This is article is about two simple Encryption and Decryption methods which I wrote using .NET Class Libraries. When you provide a string as a parameter the EncryptFromString method returns an encrypted string. Similarly, when you give the encrypted string to the DecryptFromString method it returns the decrypted string. Before you start you must have, - Visual Studio 2005/2008 Installed Step 1 : Create a Console Application Then open the Program.cs and just after the Main method paste the following code, ------------------------------------------------------------------------------------------------------------- //Encryption Method       private static string EncryptToString(string str)         {             List<uint> objList = new List<uint>();             StringBuilder strBuilder = new StringBuilder();            ...

A Client - Server App using .NET Remoting

Image
This is a basic client-server application where the client is able to view and insert records to the database using the server. Both applications have been created as Console applications, just to keep it simple ;-) Before you start you must have, - Visual Studio 2005/2008 Installed - MS SQL Server 2005 Installed Step 1 : Creating the Server Before you start to do anything  Open Visual Studio and create a Console Application in C# named ServeWithDL. Create the following folder structure and the files. Before you start to do anything, right click on References and add reference to System.Runtime.Remoting System.Runtime.Serialization System.Runtime.Serialization.Formatters.Soap Then open the Supplier.cs within the BusinessEntities folder and paste the following code; ==================================================================== using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections...

Co-existence : IBM DB2 and MS SQL Server 2005 using Linked Server

Image
Well, this article explains about connecting to an IBM DB2 Database using a Linked Server which is available in MS SQL Server 2005. The underlying connection is established through an ODBC connection. You can also use this Linked Server to retrieve data and execute updates, to and from IBM DB2 Database. This method has proven very effective in a project which I recently worked on. Currently, it is being used to Synchronize data with an IBM DB2 Database which resides on an AS 400 system and a MS SQL Server  2005 Database. Prerequisites : You must have, - IBM DB2 Server or Client Installed - MS SQL Server 2005 Installed Step 1 : Creating the ODBC Connection. Navigate to Start -> Control Panel -> Adminitrative Tools -> Data Sources (ODBC) Pic 1.1 - Select IBM DB2 ODBC DRIVER and Click Finish Button Pic 1.2 - Give a Name to the Data Source Remember to Select the Database alias of the IBM DB2 Database you want to connect to...