ORACLE: drop a table if it already exist

Oracle does not have a simple if table exists, drop it command like in MySQL. However, you can use this piece of code in your Oracle pSQL code to achieve the same thing: catching the exception ORA-942 table not exist. — drop tables if exists TEST_TABLE BEGIN EXECUTE IMMEDIATE ‘DROP TABLE TEST_TABLE CASCADE CONSTRAINTS’; EXCEPTION […]

person Jason Huangaccess_time May 5, 2015launch Read More

How to use Android Preference

Android provided a class that makes it easy to implement your preference screen. In this example, I’m going to show you how to easily put in some preference/ settings options in your own android app. 1. You need to create an XML file (something called: userpreference.xml) in the /res/xml/ folder.   2. You simply need […]

SQLite: select certain # of records

A column name can be any of the names defined in the CREATE TABLE statement or one of the following special identifiers: “ROWID”, “OID”, or “_ROWID_”. These special identifiers all describe the unique integer key (the rowid) associated with every row of every table. The special identifiers only refer to the row key if the […]

C#: Save File Dialog

It’s fairly easy to call up the standard windows File Save dialog box. The following simple example shows you how to create an instance of SaveFileDialog, then assign different properties. Some of the properties: Title : name of the Save Dialog Box (such as “Save this text file to your document”) InitialDirectory: when the dialog […]

C#: Drag and Drop Tutorial

In this simple tutorial, I can show you how to easily add drag and drop to your windows form application. Here is the steps: – First you need to set the control’s AllowDrop property to True. (such as your main windows form of your application) – Write your own DragDrop Event and then the DragEnter […]