Skip to main content

Posts

Showing posts from 2011

The Facebook Dislike Button is a Fake

Beware of the rapidly spreading "Activate Dislike Button" on Facebook. An article in GMA news website has a detailed explanation about the technical aspects of this link. CHECK IF IT'S REAL OR NOT It has few variations and it appears to have hacked a friend's account, allowing it to tag you in a post. Observe however how the post was made. You can see that successive posts are made about this but notice that it came from different media sources (pictures and names removed to keep privacy): Facebook just released the dislike button! Click On 'Activate Dislike Button' below to enable it on your account! about an hour ago  via  Facebook® for HP webOS  ·  Like  ·   ·  Activate Dislike Button Facebook just added the dislike button! Click on 'Activate Dislike Button' below to enable it on your profile! about an hour ago  via  Facebook for Windows Phone  ·  Like  ·   · Activate Dislike Button Facebook just released the dislike button! Click on &#

Difference between a Database and DBMS

Just finished my training and certification exam for an IBM academic evangelist. The training covered database fundamentals and DB2. There were other topics covered relating to databases and database management systems like SQL and XML, but I'd like to put more emphasis on database and DBMS or Database Management Systems. Although I have been practicing as a software developer and IT instructor, I have never taken any particular detail to the theories and concepts of databases, much more handle such subjects. The training refreshed me with what I learned in college as well as given me more information about databases and DBMSs. Here are a few things that I've re-learned (because apparently, I forgot or I did not learn at all): Database in a general point of view refers to any data repository. It can be a software. It provides an interface to access DATA.  DBMS or Database Management System is a software system. Whereas database provides a way to access data, DBMS provides a

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, int, not null     QuantityBought: int Now, we can start with our C# application. I'm using C# express 2008. 1. Create a new Win

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='&quo