12.03.2009

Sybase Invitation - PowerBuilder 12 Preview Event

I got email from Sybase recently regarding PowerBuilder 12 Preview Event. Those who interested in Powerbuilder 12 Preview can come attend the event as stated below.

-------- email from Sybase -----------------------

Sybase invites you to "get ahead of the game" at their PowerBuilder 12 Preview Event.

Date: 15 December 2009
Venue: Crowne Plaza Mutiara Kuala Lumpur
Time: 9.30am - 12.30pm
RSVP: Pkoo@sybase.com


During this event you will get to see the Features and Capabilities of PB 12 and a complete test drive. With the release of PowerBuilder 12 scheduled for 2010 production, Sybase will be entering the complete world of .NET with their premier development tool. This release is completely housed within the .Net Isolated Development Shell. The new PB 12.Net is based on the WPF (Windows Presentation Foundation) features of the .Net framework that utilizes the new XAML language.

Presenting in this event is Mr Dave Fish - a Senior Sybase Technical Director with extensive experience on development tools, particularly the PowerBuilder family of products.

Agenda

9:30 am - 10:15 am - PowerBuilder Overview and Roadmap
10:15 am - 10:45 am - How to Web Enable PowerBuilder Applications
10:45 am - 11:00 am - Break
11:00 am - 12:00 pm - A Closer Look at PowerBuilder 12 and WPF Application Development

Sybase Powerbuilder 11.x for Microsoft .NET applications & PowerBuilder 12 Preview

PowerBuilder’s core strengths are lauded by analysts and customers. Why? Because it’s proven technology that gets the job done and meets your challenges. You can deploy your applications to the Web, Mobile, JEE, and .NET. You can support XP and Vista. You get native RDBMS support. You can develop Rich Internet Applications. You can do all this with the unmatched productivity PowerBuilder is known for. You don’t have to rewrite the wheel. You can modernize your code and applications with PowerBuilder 11.5.

11.16.2009

Fungsi Dateadd di dalam Oracle

Bagi mereka yang biasa dengan Sybase dan MS SQL mungkin sedikit 'ralat' kerana ketiadaan fungsi dateadd yang biasa digunakan untuk data jenis datetime/date. Ini kerana Database Oracle menggunakan kaedah + atau - dalam operasi data jenis date, kecuali fungsi add_months yang disediakan untuk operasi + - bagi bulan.

Untuk mengatasi masalah ini apa yang perlu dibuat ialah membuat satu user function yang berfungsi seperti dateadd di dalam Sybase ataupun MS SQL. Di sini saya sertakan contoh script yang boleh digunakan.

CREATE OR REPLACE FUNCTION f_dateadd
(
pi_mode IN CHAR,
pi_num IN NUMBER,
pi_startdate IN DATE
)
RETURN DATE
AS
lv_returndate date;
BEGIN
/*-Mode Value --------------------------------
Script by : http://kuasapembina.blogspot.com
----------------------------------------------
'D' = Day , 'W' = Week
'M' = Bulanan 'Q' = Quarter
'H' = Half-Year 'Y' = Year
----------------------------------------------*/

IF pi_mode = 'D' THEN -- Day
lv_returndate := trunc(pi_startdate) + pi_num;
END IF;

IF pi_mode = 'W' THEN -- Week
lv_returndate := trunc(pi_startdate) + (7 * pi_num);
END IF;

IF pi_mode = 'M' THEN -- Month
lv_returndate := add_months(trunc(pi_startdate), pi_num);
END IF;

IF pi_mode = 'Q' THEN -- Quarter
lv_returndate := add_months(trunc(pi_startdate), (3 * pi_num));
END IF;

IF pi_mode = 'Y' THEN -- Year
lv_returndate := add_months(trunc(pi_startdate), (12 * pi_num));
END IF;

IF pi_mode = 'H' THEN -- Half Year
lv_returndate := add_months(trunc(pi_startdate), (6 * pi_num));
END IF;

RETURN lv_returndate;
END;


Cara memanggil script dalam SELECT :

SELECT f_dateadd('D', 3, sysdate) FROM dual;

SELECT f_dateadd('D', 3, to_date('17 nov 2009')) FROM dual;

Di dalam contoh di atas, kedua-duanya menghasilkan jawapan yang sama iaitu :

----------
20/11/2009


Selamat Mencuba.

11.15.2009

Reminder : 45 days left

It is a reminder to me. I have only 45 days left to terminate my credit cards before 1 January 2009.

Starting January next year the government will imposed RM50 credit card service tax on all principal credit card users and RM25 for every supplementary(Budget 2010). The reason cited is to discourage people from unwise spending.

Some people suggest that the RM50 service tax on principal credit cards to be absorbed by the banks that issue them. But Banks are still awaiting further guidelines from authorities before commenting on this. Read here for announcement by Maybank on RM 50 service Tax

So the best option for me is to terminate all the credit cards and leave only one card (for emergency cases: what if car broke down?). For those who want to terminate their cards, don't forget to claim your reward points before doing so.

In case the banks are willing to absorb the tax, then it is no harm to apply it again. Usually banks are giving goodies for new credit card application!





11.09.2009

Harian Metro vs Kosmo : Berita sama tapi beza

Hari ini saya membeli dua surat khabar serentak kerana ada sebab yang menarik.

Mulanya saya hanya membeli surat khabar Kosmo sahaja. Kemudian entah macam mana terdetik untuk membaca berita yang sama di akhbar harian metro online.Mulanya tidak perasan, tapi terus terfikir.

"Eh... tadi masa baca kosmo tadi tak ada la pulak..."

Terus saya membeli harian Metro untuk kepastian. Sah memang berbeza. Selain daripada fakta umur (Kosmo tulis lelaki berumur 75, tetapi Harian Metro tulis 81 tahun), ada satu lagi perbezaan yang agak mengejutkan.

Jadi di sini saya paparkan perbezaan tersebut.



Gambar di atas diambil dari surat khabar Kosmo bertarikh 10 November 2009. Manakala gambar di bawah pula diambil dari surat khabar Harian Metro pada tarikh yang sama. Dapatkah anda melihat perbezaan tersebut?


Untuk gambar yang lebih jelas sila layari http://www.hmetro.com.my/Tuesday/BeritaUtama/20091110070639/Article

Saya tidak tahu dan pasti apakah motif akhbar Kosmo 'menghilangkan' imej tersebut. Ini bukan berita politik dan tidak ada kena mengena dengan politik dan orang ramai pun tidak terfikir untuk mengaitkannya dengan politik. Tetapi bila isu sebegini berlaku maka kemungkinan orang ramai akan mempertikaikan kredibiliti akhbar dalam melaporkan sesuatu berita.

Wallahu'alam.

Penangan Cemburu

Disebabkan cemburu, seorang lelaki tua yang berusia 75 tahun (Harian Metro kata 81 tahun) hilang kewarasan sehingga sanggup membunuh isterinya yang berusia 73.

Berita lanjut sila baca di sini http://www.hmetro.com.my/Tuesday/BeritaUtama/20091110070639/Article

atau di sini http://www.kosmo.com.my/kosmo/content.asp?y=2009&dt=1110&pub=Kosmo&sec=Negara&pg=ne_02.htm


Begitulah penangan nafsu, khususnya nafsu amarah. Ia tidak mengira umur, jantina bangsa dan agama.

Ya Allah, jauhkanlah kami dari sifat amarah dan sifat-sifat mazmumah yang lain dan hiaskan diri kami dengan sifat-sifat mahmudah....

11.08.2009

Notice : Sybase ASE 12.xx End Of Life

Hari ini dapat email dari Sybase. Sybase ASE.12x akan tamat tempoh hayatnya pada 31 Dec 2009.

"
---------- deleted--------------

Dear Sybase Customer,

Greetings from Sybase!

I am sending you this email for your information. ASE 12.x will be End of Life on Dec 31. We can support you with ASE 15 Upgrade and Migration projects. Our experts also have specific domain expertise in Financial Services, Banking, Hospitals, and Insurance industries.

---------- deleted--------------

Ok. Noted.

10.28.2009

Oracle Tips : Reset ROWNUM pada setiap group

Tips ini diperolehi dari laman web oracle dan diberikan oleh Satyanarayana Josyula, Sr. Oracle DBA at Nexus Energy Software, in Reston, Virginia. Untuk maklumat lanjut sila layari
http://www.oracle.com/technology/oramag/code/tips2004/082304.html

Kita menggunakan ROWNUM untuk menomborkan secara berturutan (seperti 1, 2, 3....) senarai rekod dari SELECT statement. Kadang-kadang terdapat keperluan untuk memaparkan laporan atau senarai rekod dengan nombor siri yang berturutan pada setiap rekod(rows) dan nombor tersebut akan bermula pada nombor 1 semula bagi kumpulan(group) yang baru (seperti contoh di bawah; lajur 4)

Contoh

Nama table : BATCHLIST
BATCH_NO STATE Jika guna ROWNUM Hasil yang dikehendaki
-------- --------- ---------------- ----------------------

A1 PERAK 1 1
A1 PERAK 2 2
A1 PERAK 3 3
B2 SELANGOR 4 1
B2 SELANGOR 5 2
C3 PAHANG 6 1
C3 PAHANG 7 2
C3 PAHANG 8 3
D4 KELANTAN 9 1


Anda boleh melakukannya dengan menggunakan SELECT STATEMENT berikut :

SELECT A.BATCH_NO,
DECODE(ROWNUM - min_seqno,0, 1, ROWNUM + 1 - min_seqno) AS seqno
FROM (SELECT * FROM BATCHLIST ORDER BY BATCH_NO) A,
(SELECT BATCH_NO, MIN(rownum) min_seqno
FROM (SELECT * FROM BATCHLIST ORDER by BATCH_NO)
GROUP BY BATCH_NO
ORDER BY BATCH_NO) B
WHERE A.BATCH_NO = B.BATCH_NO
ORDER BY A.BATCH_NO;

How to avoid windows running FDISK when start @ reboot

If your Windows keeps on running FDISK command when your start or reboot your computer, it is very irritating and frustrating. To do away this problem you might try this solution. I found this solution after facing the same problem a few months ago (after several hours googling of course!). Hopefully it will help those who need it!
  1. Click the Start Button and select Run
  2. In the Run dialogue box type: cmd
  3. Windows will then open command prompt screen : type fsutil dirty query : (Replace : with drive disk you have problem with; like E:, or D:, example fsutil dirty query C:) and press enter.
  4. IF system indicates that the disk is 'dirty' then go to step 5 else go back to step 3.
  5. Type: CHKNTFS /X : (eg CHKNTFS /X C:) and press Enter.
  6. Reboot the PC.
After rebooting the PC, proceed with the following steps
  1. Click Start>Run and type cmd.
  2. Windows will then open command prompt screen : Type: CHKDSK /f/r : (eg: CHKDSK /f/r C:) and press Enter.
  3. After the drive has been scanned type: fsutil dirty query : (eg. fsutil dirty query C:) and press Enter
  4. Message should appear volumn - : is not dirty.
That's it. Mission accomplished!

10.21.2009

How to Install Sybase ASE 11.5 on Windows 2003

Recently, we installed Sybase ASE 11.5 on Windows 2003 for one of our projects need. Installation seems to run smoothly without any problems and creating an adapter server after that is also successful. But when we tried to start the server using Services (Administration Tools>Services) or using Sybase Central, the server is failed to start as a service.

After doing some searching and ‘googling’, I found that this step-by-step workaround is our savvier and we managed to start the server using Services & Sybase Central. The only problem is that we cannot configure the server using Sybase Utility sybconfig.exe. But it is 'okay' for us and case closed!

Step-by-step workaround

1) Download the "Windows Server 2003 Resource Kit Tools"

2) Install the "Windows Server 2003 Resource Kit Tools" into a directory like "c:\reskit".

3):\Program Files\Windows Resource Kits\Tools>cd \reskit

3) Remove the existing SQL Server service using the following command.
c:\reskit> INSTSRV YourSQLServerServiceName REMOVE
upon successful, message 'The service was successfully deleted!' will appear

4) Install the SQL Server service using the "INSTSRV" utility command
C:\reskit>instsrv YourSQLServerServiceName C:\reskit\srvany.exe
Upon successful, message 'The service was successfuly added!

Make sure that you go into the Control Panel and use the Services applet to change the Account Name and Password that this newly installed service will use for its Security Context.' will appear.

5) In the Registry Editor window, go to HKEY_LOCAL_MACHINE | SYSTEM | CurrentControlSet | Services and click your SQL Server service name).
a. Add a new key by selecting Edit | New | Key. Enter "Parameters" as the Key name.
b. Click Parameters and add a new string value by selecting Edit | New | String Value. Enter "Application" as the new String value.

c. Double-click Application. The Edit String dialog box appears. In Value Data field, enter:
c:\sybase\bin\sqlsrvr.exe -C -SYourSQLServerName -IC:\sybase\ini

6) Select Control Panel | Services. Click , then click Startup.