Skip to main content

Posts

Sample CRUD application in C# and MS SQL Server

For this example, we'll be creating a simple sales management for a ticketing office named ACheapSeat. The application allows buying of tickets for a particular event in a given venue. For this example, let's have tickets for three (3) venues: Cowboy Stadium Tickets , Ringling Brothers Circus Tickets , and Kyle Field Tickets . First, create the database named acheapseat in MS SQL Server. (I'm using MS SQL Server 2005 Express edition). Create the following tables: 1. Venues     Id: int, PK, Auto-increment, not null     Name: varchar(50), not null 2. Events     Id:int, PK, Auto-increment, not null     Description: varchar(50), not null     DateTime: timestamp, not null     VenueId: FK, int, not null     Price: numeric 3. TicketSales     Id: int, PK, Auto-increment, not null     DateBought: timestamp, not null     EventId: FK,...

How to create a Login form in C#

Create a "Windows Forms Application" project Add a new form. By default, it will have a name of "Form2" Add 2 labels, 2 textboxes, and 2 buttons like the one shown below: open the first form (Form1) and double click on the empty space. This should show the Form1_Load event. Declare an instance of Form2 and display it. (Use ShowDialog instead of Show). Open the second form (Form2) and view the properties of the second textfield (password text box). Specify * in the PasswordChar attribute.  Double click on the Login button. This will show the button1_click event. Put all necessary checking here like the one shown. **You can change the checking part to comparing the values with your database. For example: OleDbConnection cn = new OleDbConnection("YourConnectionString"); cn.Open(); DataTable dt = new DataTable(); OleDbCommand cmd = new OleDbCommand("select * from usertable where username='"+textBox1.Text+"' and password='...

Is K12 useful for IT Education in the Philippines?

Before I give my opinion on this, let us try to define first what is K12.  K12 is a term used in education from the first world countries. It refers to grades from kindergarten (K) and the 1st through the 12th grade (1-12). This setup might be familiar with other people. It is even a normal setup for many. However, in the Philippines, it is a different setting. Primary education here starts from nursery up to kindergarten. There's nursery 1 and 2, kindergarten 1 and 2, grades 1 to 6, and for the high school, it's from 1st year to 4th year. The following is a usual age mapping for these education levels: Age     Level 3         Nursery 1 4         Nursery 2 5         Kinder 1 6         Kinder 2 7         Grade 1 8         Grade 2 9         Grade 3 10       Grade 4 11       Grade 5 12 ...

Connecting to Firebird using C# express 2008

It's quite easy creating a simple information system with Firebird and C# express 2008. You will need the following to do this: 1. Firebird RDBMS (The latest release as of this post is 2.1.3) 2. EMS IBManager Lite (The freeware version. There are other Free Firebird IDE that you can use but for me, this one is the most user-friendly) 3. Microsoft C# Express 2008 (This can be downloaded at the Microsoft Website) 4. Firebird .Net Provider Creating the database: 1. Create a database in EMS IBManager Lite We'll create a table for recording our Gold IRA Deposits. An IRA is a retirement account that can be used by an employed person. It can be in various form. One of which is an IRA Gold in which instead of money being deposited, you deposit gold. It can be a gold coin. Preferably, it would be good to deposit high value items such as a 401k Gold . Use the following for the fields. Be sure to edit the ID field to have an autoincrement va...

Firebird Tools

Firebird SQL Database has been existing for so long already. However, not many have created a free and open source Firebird tool or IDE that is really easy to use. Developers are forced to use commercial ones because the free and open source in my opinion are not user-friendly at all. It's just ironic that a very good free and open source DBMS lacks decent free and open source IDE. I would like to create one and post it at sourceforge but I'm not that skilled yet. Hopefully soon. In the meantime, let's just enumerate the existing Firebird Tools currently being used by developers. 1. FlameRobin 2. EMS for Interbase and Firebird Lite 3. IBExpert 4. Lazarus 5. Firebird Maestro Of these, I like the EMS IDE.

Firebird

Firebird is a free relational database that allows many SQL features and has existed since 1981. It supports indexing, primary key, foreign key, stored procedures, and many more. You can use it in many platforms of Linux and Windows. I liked using it because it's free. The only problem is with its IDE. It is really hard to find a user-friendly IDE that is also free. Although there is Flamerobin, I didn't like using it. The commercial ones like EMS for Firebird and IBExpert. I just wish the open source community also comes up with a comprehensive IDE for Firebird. It also took a very long while for Firebird to come up with another version. Maybe because it is almost complete.

Everything Virtual on the Internet

The Internet has become a great tool in our time today. It has become a means to live a different life. Almost everything can be virtualized on the Internet. We can have friends anywhere. We can become different persons with different lifestyles in different places in a different world. It has created a new way of living. One reality that has become virtualized over the Internet is gambling. There are many types of gambling. From card games to slot machines, the Internet offers all of them. Some are free and some for a fee. You can have an online casino from different websites. Even facebook has applications with online casino. People mostly prefer free online casino . It’s just a way to entertain ourselves and make new friends both locally and abroad. An online casino is a form of website that provides you the opportunity to gamble on the Internet. It is also called Internet Casino or Virtual Casino. Whatever your game plan is, it’s either you win or lose money. Sometimes, I enjo...