Sunday, October 26, 2014

Adding sub folder included in the setup option with Inno Setup Compiler

[Files]
Source: "yourexefile.exe"; DestDir: "{app}"; Flags:replacesameversion
Source: "subfolder\*.*"; DestDir: "{app}\yoursubfolder"; Flags:replacesameversion

Monday, June 23, 2014

Sendmail: Clear / Delete / Flush Mail Queue

You can use the mailq command sendmail -bp command to display a summary of the mail messages queued for future delivery. Type the following command:
# mailq
OR
# sendmail -bp
Sample outputs:
  /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
p61J75u5037681      893 Fri Jul  1 14:07 
      8BITMIME   (Deferred: Connection timed out with example.com.)
      
  Total requests: 1
You can cd to /var/spool/mqueue and delete all files if you want to get rid of all messages in the queue:
# cd /var/spool/mqueue/
# ls
# rm *


Thanks to: http://www.cyberciti.biz/faq/linux-unix-bsd-clear-sendmail-queue/

Tuesday, April 01, 2014

SQL - To get return null value when selection no match

SELECT     TOP (100) PERCENT dbo.V_PERKIRAAN.KodeRek, ISNULL(SUM(dbo.V_JURNAL.TRANSAKSI), 0) AS SALDOAWAL
FROM         dbo.V_PERKIRAAN LEFT OUTER JOIN
                      dbo.V_JURNAL ON dbo.V_PERKIRAAN.KodeRek = dbo.V_JURNAL.KodeRek AND dbo.V_JURNAL.Tgl <= '2014-01-01' AND YEAR(dbo.V_JURNAL.Tgl) = '2014'
GROUP BY dbo.V_PERKIRAAN.KodeRek
ORDER BY dbo.V_PERKIRAAN.KodeRek


Tuesday, March 25, 2014

How to register an ActiveX control (.ocx) manually

The following example registers the Microsoft MAPI ActiveX Control without displaying any messages:
   Regsvr32 /s MSMAPI32.OCX
 
 
Source: http://support.microsoft.com/kb/146219 

Friday, March 07, 2014

Linux : Edit /etc/fstab from Repair filesystem” prompt

Use following command to mount the filesystem with writable permission:
Repair filesystem # mount -w -o remount /
After this you can go and change /etc/fstab file. Restart your computer and that’s it.

Monday, February 17, 2014

SQL Crosstab Query by Month

SELECT KodeRek, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 1 THEN TRANSAKSI ELSE 0 END) AS JAN, SUM(CASE WHEN MONTH(TGL) = 2 THEN TRANSAKSI ELSE 0 END) AS FEB, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 3 THEN TRANSAKSI ELSE 0 END) AS MAR, SUM(CASE WHEN MONTH(TGL) = 4 THEN TRANSAKSI ELSE 0 END) AS APR, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 5 THEN TRANSAKSI ELSE 0 END) AS MAY, SUM(CASE WHEN MONTH(TGL) = 6 THEN TRANSAKSI ELSE 0 END) AS JUN, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 7 THEN TRANSAKSI ELSE 0 END) AS JUL, SUM(CASE WHEN MONTH(TGL) = 8 THEN TRANSAKSI ELSE 0 END) AS AUG, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 9 THEN TRANSAKSI ELSE 0 END) AS SEP, SUM(CASE WHEN MONTH(TGL) = 10 THEN TRANSAKSI ELSE 0 END) AS OCT, " & _
                      "SUM(CASE WHEN MONTH(TGL) = 11 THEN TRANSAKSI ELSE 0 END) AS NOV, SUM(CASE WHEN MONTH(TGL) = 12 THEN TRANSAKSI ELSE 0 END) AS DEC " & _
"FROM V_JURNAL WHERE YEAR(TGL)=" & cmbTahun.Text & "" & _
"GROUP BY KodeRek"

Sunday, February 09, 2014

Calculating age from a birth date in Access

=DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") < Format( [Birthdate], "mmdd") )

Sunday, January 26, 2014

Format Date Time SQL

SELECT convert(varchar, getdate(), 100) - mon dd yyyy hh:mmAM (or PM)
                                        - Oct  2 2008 11:01AM          
SELECT convert(varchar, getdate(), 101) - mm/dd/yyyy - 10/02/2008                  
SELECT convert(varchar, getdate(), 102) - yyyy.mm.dd - 2008.10.02           
SELECT convert(varchar, getdate(), 103) - dd/mm/yyyy
SELECT convert(varchar, getdate(), 104) - dd.mm.yyyy
SELECT convert(varchar, getdate(), 105) - dd-mm-yyyy
SELECT convert(varchar, getdate(), 106) - dd mon yyyy
SELECT convert(varchar, getdate(), 107) - mon dd, yyyy
SELECT convert(varchar, getdate(), 108) - hh:mm:ss
SELECT convert(varchar, getdate(), 109) - mon dd yyyy hh:mm:ss:mmmAM (or PM)
                                        - Oct  2 2008 11:02:44:013AM   
SELECT convert(varchar, getdate(), 110) - mm-dd-yyyy
SELECT convert(varchar, getdate(), 111) - yyyy/mm/dd
SELECT convert(varchar, getdate(), 112) - yyyymmdd
SELECT convert(varchar, getdate(), 113) - dd mon yyyy hh:mm:ss:mmm
                                        - 02 Oct 2008 11:02:07:577     
SELECT convert(varchar, getdate(), 114) - hh:mm:ss:mmm(24h)
SELECT convert(varchar, getdate(), 120) - yyyy-mm-dd hh:mm:ss(24h)
SELECT convert(varchar, getdate(), 121) - yyyy-mm-dd hh:mm:ss.mmm
SELECT convert(varchar, getdate(), 126) - yyyy-mm-ddThh:mm:ss.mmm
                                        - 2008-10-02T10:52:47.513
- SQL create different date styles with t-sql string functions
SELECT replace(convert(varchar, getdate(), 111), -/-, - -) - yyyy mm dd
SELECT convert(varchar(7), getdate(), 126)                 - yyyy-mm
SELECT right(convert(varchar, getdate(), 106), 8)          - mon yyyy

Thursday, October 31, 2013

VB.Net Get Data From SQL Server & Display in DataGridView (OLEDB)

VB.Net Get Data From SQL Server & Display in DataGridView (OLEDB)

VB.Net, by admin. Code below for retrieve data from SQL Server and display in DataGridView.
Dim da As OleDb.OleDbDataAdapter
Dim SQL As String
Dim dt As New DataTable
SQL = “Select * From TableName”
da = New OleDb.OleDbDataAdapter(SQL, conn)
da.Fill(dt)
DataGridView1.DataSource = dt

Source: http://it-solve.hostoi.com/?p=175

Sunday, October 27, 2013

Saat sujud, tangan dahulu..

Dari Abu Hurairah, dia berkata Rasulullah shallallahu’alaihi wa sallam telah bersabda: ” Apabila salah seorang dari kamu sujud maka janganlah di turun (ke sujud) sebagaimana turunnya onta, dan hendaklah dia meletakkan kedua tangannya (turun dengan kedua tangannya lebih dahulu) sebelum kedua lututnya “.

Thursday, September 19, 2013

Import/Export Data using Management Studio Express?

Need to import/export data from a table in SQL? if you are using Microsoft SQL Management Studio Express, you can't find that tools. So you need to download  from Microsoft SQL Server 2005 Express Edition Toolkit:

http://www.microsoft.com/downloads/details.aspx?FamilyID=3c856b93-369f-4c6f-9357-c35384179543&displaylang=en

After installation done,  you can find it under: C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe


Tuesday, September 17, 2013

Iseng..while wait compiling..KLA Project - Kidung Mesra

KLA Project - Kidung Mesra 
Kutulis sebaris kata
walau sederhana
Tertuju bagimu, Nona
yang mengusik jiwa
*Senyummu bunga…musim cerah
Matamu surya…memancar ramah
Ingin selami samudra hatimu
temukan mutiara tiada tara
Lalu terlena rebah didasarnya
Ingin masuki puri di hatimu
hangatkan ruangnya dengan cinta
Dalam irama kita berdansa
dan terbuai
kidung mesra
milik kita
Kususun serangkai nada
walaupun biasa
Terlantun bagimu, Nona
yang menyentuh jiwa

Monday, September 16, 2013

Crystal Report Error "Runtime Error 20532 Cannot Find Database DLL"

When you find this error on Crystal Report when you print, here is the solution:
By registering a DLL named p2sodbc.dll from Start -> Run -> Regsvr32 /s p2sodbc.dll

Sunday, September 15, 2013

You receive the “Interface not registered” error message when you try to send or to save an e-mail message to the Drafts folder in Outlook 2002

You receive the “Interface not registered” error message when you try to send or to save an e-mail message to the Drafts folder in Outlook 2002.

Solution:

To resolve this problem, register the Ole32.dll file. To do this, follow these steps:

  1. Click Start, click Run, type the following command in the Open box, and then click OK:
    Regsvr32.exe %Windir%\System32\Ole32.dll
  2. In the RegSvr32 dialog box, click OK.
Source: http://support.microsoft.com/kb/870707

 

Thursday, August 29, 2013

How to find duplicates in Excel

To find duplicate records:
Put this at formula, and change rows number as needed. =IF(COUNTIF(C$4:C$1000,C129)>1,"Duplicated","")

Full Documentation at: http://www.techrepublic.com/blog/windows-and-office/how-to-find-duplicates-in-excel-245163/

Tuesday, August 20, 2013

VB6 Package and Deployment wizard compile error 80010108

This is a known issue and has been tracked. The Track ID is 53800.

To resolve this error, open Crystl32.dep in Notepad or a similar text 
editor and modify the section: 

[CRPE32.DLL]
Dest=$(WinSysPath)
Uses1=CRPE32.DLL
Uses2

Now just comments above lines as shown below in Crystl32.dep. 

;[CRPE32.DLL]
;Dest=$(WinSysPath)
;Uses1=Crpe32.dll
;Uses2= 

Also ensure that the Crystl32.dep file is in the \WinNT\System32 folder.

Thursday, May 23, 2013

MS. Excel: ISNA function

To handle error #N/A In Microsoft Excel, when use VLOOKUP function searches for value in the left-most column of table_array and returns the value in the same row based on the index_number.
One problem that can occur is when there is not a match so it returns N/A. Here is an example: