Sunday, April 26, 2009

OOP-Insert Record to Database - c#

This is a simple example to show how to insert record to database. Database is created in sqlserver. This is a major problem where beginers face in OO programming in c#, where they don’t know how to separate layers and do the standerd coding.

This example shows how to insert record to database and as well as the oo progaramming style.
Try it and have an idea.

The only changes you have to make is change the server name(amila-pc\).
“using (SqlConnection conn = new SqlConnection(@"Data Source=amila-pc\sqlexpress;Initial Catalog=Employee;Integrated Security=True"))”

Download
Source code


Thursday, April 2, 2009

Basic Client Server Program – C#-VS2008

This Is basic example to show client server architecture. Things you should remember is to establish connection between client and server socket. Once the sockets are established and connection is made you can communicate.

In the communication normally sender sends a string other side. So recipient should be capable of reading the content and understand what to perform. So that it is very useful to send the string bind with special header (command)where recipient can understand the command and process.

Below example shows you key features how to communicate within server and client

Source code is available at following link:


Wednesday, April 1, 2009

Create Dynamic Contact Info Form -AS3

This project is basically describing how to send data to a database by using flash action script 3.
  • All the GUI controls are listed in the xml file. GUI is created by reading the values in xml. So this makes high user interaction where user can simply add the control to xml and view it in the design. (And you can get an idea how to read values from XML)
  • PHP is used for connecting MYSQL database and Flash form. You can use any server side code to create the link between Application and DB.(You Can get an idea of sending data from flash from and retrieving values from server side program).
  • This example gives you an idea, the way of using “oop” in proper manner.

Source code is available at following link:
Contact_Info.rar

  • SQL file is available in the folder where you can create the database easily.