USoft, action-other-control

I am convinced my current employer is the only place on planet Earth where some applications that were developed with a horrible product called USoft, are still running in production. But that’s a bigger issue that we can delve into later. The problem I’m having is with a function called “action-other-control”. The documentation claims this function can be used to edit the property of another control on a form. Unfortunately, the example in the book has incorrect syntax. It surrounds the “search-spec” with double quotes, which not surprisingly, doesn’t work when I follow the example. I think I have tried every possible combination of single, double, and no quotes. Still no luck.

Is anybody else out there using this piece of garbage called USoft? My search for the function name “action-other-control” returned 0 results! Ugh.

Adobe (Acrobat) Reader Alternatives

Anybody else annoyed by the constant update reminders from the Adobe Reader software? I want my PDF reader software to do only one thing - read PDF files. Honestly, I am not interested in any extra functionality from my PDF reader. Fortunately, I found some decent looking alternatives as I searched. I stumbled upon a very sarcastic and quite entertaining blog post with some good recommendations scattered throughout the comments.

Luckily, my MacBook already has a lite reader built-in. Looks like some good options for my Windows machines might be FoxIt or Sumatra.

Source(s):

Thank you, Adobe Reader 9!

How to Program the Buttons on your MCE Remote

I wanted my Windows Media Center remote control to turn on my TV. I knew there was a way to do it, but if my remote came with a manual, that manual is long gone. Anyway, I found the answer I was looking for.

First, to reset any previous button programming:

  1. Press and hold the DVD Menu button
  2. While holding the DVD Menu button, press and hold the left navigation arrow button for a few seconds. When you release the left navigation button, all the lights on the remote should blink a couple times. The blinking should be pretty obvious. If not, try it again.
  3. If the lights blinked, the remote is reset.

Now, to program my TV power button:

  1. Press and hold the DVD Menu button
  2. While holding the DVD Menu button, press and hold the OK button until the lights of the remote shut off.
  3. Press the button you’d like to program. In my case, it’s the TV button.
  4. Position the MCE remote about 2 inches in front of the remote you’re learning from.
  5. Press and hold the button from the teaching remote until all the lights on the MCE remote blink two times.
  6. If you got the blinks you’re good to go. If not, try the process all over again.

Source(s): How to program the buttons on your MCE Remote

Rollback Transaction - Oracle Equivalent

In T-SQL, I am able to use the ROLLBACK TRANSACTION statement to “undo” previous statements. For example, to update some records, then select the same records to see the changes, then perform the undo, the following is valid:

UPDATE tablename

SET columnname = newvalue

SELECT * FROM tablename

ROLLBACK TRANSACTION

In Oracle, the syntax is very similar:

UPDATE tablename

SET columname = newvalue;

SELECT * FROM tablename;

ROLLBACK;

This works for me in PL/SQL Developer as well as SQL Plus.

Source(s):

Commit/Rollback Transaction : rollback, transaction, commit

Oracle Syntax: Drop Column

To drop a single column:

ALTER TABLE table_name

DROP COLUMN column_name;

To drop multiple columns:

ALTER TABLE table_name

DROP (

column1_name,

column2_name,

column3_name

);

Note: When deleting a single column, you need to add the keyword “column”.

Source(s):

Oracle “alter table” drop column syntax example

Oracle Syntax: Add a new column

To add a single column…

ALTER TABLE table_name

ADD column_name VARCHAR2(30) NOT NULL;

To add multiple columns in one statement…

ALTER TABLE table_name

ADD (

column1_name VARCHAR2(10),

column2_name VARCHAR2(20),

column3_name VARCHAR2(30)

);

Note: You will get the following error if you try to use NOT NULL on a column in a table that is not empty…

ORA-01758: table must be empty to add mandatory (NOT NULL) column

Source(s):

Oracle “alter table” add column syntax example

Oracle - Altering Tables: Add Columns

iPhone SDK and Objective-C

I’ve been meaning to install the iPhone SDK and give it a try but I didn’t have a Mac. Now that I am armed with a MacBook, I am eager to install it and write a small application for my phone.

As a long time Windows developer, I realize I am not very sure about what this is gonna take. I started by searching for “iphone c#” to see if I could use C# to develop an application for my phone. There was a very interesting page in the results of my search by a fellow Windows developer who decided to test the iPhone development waters. Aside from all the complaints about the differences in keyboard shortcuts between xcode and Visual Studio, I got a better sense of how big a role Objective-C plays in Apple development. The post itself is pretty good but I found the battle in the comments section to be just as informative.

Source(s):

Dev Chair : iPhone SDK experience - Download Squad

What is “Dual”?

Dual is a table in Oracle with a single column of type VARCHAR2(1). It is used to evaluate expressions or select information that is not related in any specific table. For example, you would use the Dual table to select the current date.

SELECT sysdate FROM dual;

Is Dual a magic table? Maybe. It may seem strange to select something like a date from a column defined with a length of 1 but In theory, you could run the same query against any table and get the same result. If you try the same query for sysdate against a table like Employees, you’d get a result for each existing record in the Employees table. The difference is, the Dual table is meant to have only one row…but the table is not read only. Here is an interesting experiment and discussion on the implications of inserting, updating, or deleting from the Dual table.

Source(s):

dual table : dual, oracle, table

Insert into DUAL

Identity Column in Oracle

SQL Server has a very easy way of creating a column with a value that gets incremented each time a record is inserted into a table. Really all that is needed is a start value and a number to add to each value.

CREATE TABLE employee
(
EmployeeId INT IDENTITY(1,1),
FirstName VARCHAR (20),
LastName VARCHAR(30)
)

INSERT INTO employee (FirstName, LastName)
VALUES (’Charlie’, ‘Murphy’)

Notice the EmployeeId is type IDENTITY. The first record inserted into the table will have a value of 1 for the EmployeeId column. The next record will be 2. Then 3, etc. A value for this column is not specified in the INSERT statement because SQL Server has the smarts to know it needs to increment for each inserted record.

The Oracle way isn’t as straight forward. In Oracle, a SEQUENCE object needs to be created. When a record is inserted, the SEQUENCE object must be incremented manually by calling the NextVal method on the SEQUENCE object to increment the value.

CREATE TABLE employee
(
EmployeeId NUMBER,
FirstName VARCHAR (20),
LastName VARCHAR(30)
);

CREATE SEQUENCE seqEmployee
MINVALUE 1
START WITH 1
INCREMENT BY 1
CACHE 20;

INSERT INTO employee (EmployeeId, FirstName, LastName)
VALUES (seqEmployee.NextVal, ‘Charlie’, ‘Murphy’);

Source(s):

Oracle/PLSQL: Sequences (autonumber)

IDENTITY (Property)

Two Different Publish Dialogs in ASP.NET

I have two similar website solutions in Visual Studio but encountered some significant differences as I went to deploy them. They both have the Build - Publish menu item, but when I try to publish one of them I get options like: target location, use fixed naming for the assemblies, allow site to be updatable, etc.

When I go to publish the other one, I get some very different options…

Why are these publish dialog boxes so different?

The short answer is, one of the websites was created as a stock ASP.NET website and the other was created as a Web Application Project. For more detail on how these are different and when/why you should use them, Fritz Onion offers a great explanation.

Source(s):

Extreme ASP.NET: Web Deployment Projects