> command dos seperti d:\proses.exe DR;01/06/2007;19/06/2007;id='10';
> 19/06/2007 yang maksudnya saya proses module dr dengan periode data
> tanggal 01 - 19 hanya id 10 saja yang saya proses dan yang terakhir
> Public Sub Main()
> Dim arrCommand() As String
> arrCommand = Split(Command$, ";")
> MsgBox arrCommand(0) & " -> " & arrCommand(1)
> End Sub
Gabungan dari Pak Aries :
stelah didapat arrcommand, dipecah lagi, kemudian diproses
contoh :
perintah "d:\proses.exe DR;01/06/2007;19/06/2007;id='10';" akan menghasilkan
arrcommand(0)="DR;01/06/2007;19/06/2007;id='10';"
kemudian pecah :
dim Perintah() as string
perintah=split(arrcommand(0),";")
hasilnya :
perintah(0)="DR"
perintah(1)="01/06/2007"
perintah(2)="19/06/2007"
perintah(3)="id='10'"
masukkan ke dalam :
select case perintah(0)
case "DR"
SQL="select * from tbl where Tgl>='" &
format(perintah(1),"yyyy/mm/dd") & "' and Tgl<='" &
format(perintah(2),"yyyy/mm/dd") & "' and " & perintah(3)
end select
semoga membantu
Best Regards,
David J M
Advess - ISV