Rabu, 21 Desember 2011

Compile Oracle Forms Builder di Linux

Mungkin ada yang baru belajar cara membuat atau modifikasi oracle form builder di EBS.  Saya mencoba sharing cara compile oracle forms builder di Linux. Langkah-langkahnya adalah :

1. Login ke user aplikasi

2. Aktifkan enveroment.
    (Exp :  . /u01/orafin/testappl/APPSORA.env)

3. Copy/ftp file form (xxx.fmb) ke folder aplikasi, biasanya terletak di $AU_TOP. ( /u01/orafin/testappl/au/11.5.0/forms/US/ )

4. Compile form tersebut.
    (format : f60gen module=<formname>.fmb userid=apps/<apps_pwd> output_file=/forms/US/<formname>.fmx )

    (Exp :  f60gen module=//u01/orafin/testappl/au/11.5.0/forms/US/PATESTPR.fmb userid=apps/apps output_file=//u01/orafin/testppl/pa/11.5.0/forms/US/PATESTPR.fmx

Selamat mencoba.

Selasa, 20 Desember 2011

Merubah Tanggal dan Jam System di Linux

Tanggal dan jam di komputer Linux mungkin ada yang salah, untuk melakukan perubahan dengan cara :

1. Login menggunakan user root.
    login as: root
   
2. Cek tanggal sekarang di linux.
    # date
    Sun Jan  1 02:30:34 WIT 2012

3. Mengganti tanggal menjadi 20 Februari 2012.
    # date +%Y%m%d -s 20120220
    20120220

4. Mengganti Jam menjadi 11:30:00
    # date +%T -s 11:30:00
    11:30:00

Selamat mencoba teman-teman..... :)

Senin, 26 September 2011

History Command di Linux

Bagaiama sih cara melihat semua history command yang bernah kita tulis di linux ??
Tulis saja : history | more

Contoh :
[pitung@dbtest01 ~]$ history | more

  4  exit
  5  df -h
  6  exit
  7  top
  8  df -h
  9  top

--More--

Senin, 20 Juni 2011

Koneksi Database Access Dengan Visual Basic 6

Mungkin ada yang belum mengerahui bagaimana membuat koneksi ke Database Access dari VB6. Pertama kita buat Modul dahulu.

Option Explicit

Public adcConnect As Connection

Private Sub ConnectToDatabase()
   On Error GoTo LocalErr

   Set adcConnect = New ADODB.Connection

   adcConnect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_PARKIR.mdb;Persist Security Info=False"
   Exit Sub

LocalErr:
   Screen.MousePointer = vbDefault
   MsgBox Err.Number & Chr(13) & Err.Description, vbCritical + vbOKOnly, "Error Connection"
End Sub

DB_PARKIR.mdb adalah nama database yang dibuat dengan Access.  Selamat mencoba semoga berhasil.

StartUp & Shutdown Database Oracle

Bagaimana sih cara menstop dan startup Database Oracle. Secara singkatnya seperti ini.

Shartup Database :

1. $ sqlplus "/ as sysdba"
2. SQL> startup
3. SQL> exit
4. $ lsnrctl start

Shutdown Database :

1. $ sqlplus "/ as sysdba"
2. SQL> shutdown immediate
3. SQL> exit
4. $ lsnrctl stop

Untuk lebih lengkapnya coba baca di situs oracle :

Koneksi Database SQL Server Dengan Visual Basic 6

Mungkin ada yang belum mengetahui bagaimana membuat koneksi ke database Sql Server dari VB6. Disini akan diterangkan langkah-langkahnya.

1. Membuat file dengan extensen .udl (contoh : conDBS.udl ).


2.Double klik file conDBS.udl maka akan tampil form seperti gambar dibawah ini. Provider pilih "Microsoft OLE DB Provider for SQL Server". Setelah itu klik tombol"Next".


 3. Bila database SQL Server ada di Server (PC Lain) masukkan server name / ip address server tersebut. Jika database ada di PC local tulis saja "localhost". Setelah itu masukkan user name dan password, lalu pilih nama database. Setelah itu lakukan"Test Connection".




 4. Membuat procedure connection database di VB.

Option Explicit

'Connection
Public adcConnect As New ADODB.Connection

Public Sub ConnectToDatabase()
   On Error GoTo LocalErr
  
   Set adcConnect = New ADODB.Connection
   adcConnect.Open "FILE NAME=" & App.Path & "\conDBS.udl"
  
   Exit Sub
LocalErr:
   Screen.MousePointer = vbDefault
   If Err.Number = -2147467259 Then
      MsgBox "Connection failed, please check data link properties in path \conDBS.udl !," & Chr(13) & _
      "Or SQL Server not running. Open SQL Server service manager, server name and services must correct.", vbCritical, "Error"
       Exit Sub
   Else
      MsgBox Err.Number & Chr(13) & Err.Description, vbCritical + vbOKOnly, "Error Connection"
   End If
End Sub

Pindah Cursor Dengan KeyPress

Source code berikut ini digunakan untuk berpindah textbox ke textbox lain atau dari object satu ke object yang lain dengan menekan enter kursor akan berpindah.

Buat suatu project dengan :
1 Form
4 TextBox (Input Properties Index masing-masing textbox, dimulai dari 0,1,2,3)

Copy source code berikut pada Form :

Private Sub Text1_KeyPress(KeyAscii As Integer)
   If KeyAscii = vbKeyReturn Then
      SendKeys "{TAB}"
   End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
   If KeyAscii = vbKeyReturn Then
      SendKeys "{TAB}"
   End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
   If KeyAscii = vbKeyReturn Then
      SendKeys "{TAB}"
   End If
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
   If KeyAscii = vbKeyReturn Then
      SendKeys "{TAB}"
   End If
End Sub