Dear Friend
Sory tambahan dikit friend. Mungkin ntar bingung jadinya situ. Untuk di batch filenya buat-nya begini: a.bat yang isinya: %1 %2 %3 NB : di dos prompt, terutama di batch file, untuk %1, dst ini adalah parameter input. Jadi ketika anda mengetik C:\tes.exe /s /r /s /r itu bisa kita buat dengan parameter input. Nah, tinggal di client vbnya anda buat variable %1 %2 tersebut. Contoh untuk kasus situ : Dim strshell as string Dim str1 as string Dim str2 as string Dim str3 as string Dim Str4 as string Dim l as long Str1= "proses.exe" Str2= "DR;01/06/2007;" Str3="19/06/2007;" Str4= "id='10'" Strshell=str1 & str2 & str3 & str4 l = Shell(strShell, vbHide) if l=0 then ' fail process how ??? End if Bebas. anda bisa memodifikasi sampai seberapa banyak parameternya. Best Regards, _____ From: Mario Indra Jaya [mailto:[EMAIL PROTECTED] Sent: 20 Juni 2007 11:14 To: [email protected] Subject: RE: [indoprog-vb] Program dengan Parameter Dear Friend Kalo banyak criteria begitu, coba aja di teknik / di buat jalan lain. Metodenya begini mungkin. Buat aja batch file untuk menyimpan criteria tersebut, simpan sebagai nama file apa.bat yang isinya parameter yang diinginkan. c:\proses.exe DR;01/06/2007;19/06/2007;id='10' Setelah itu beres deh, langsung eksekusi aja batch file tersebut pakai perintah shell command. (Jangan lupa cek validasi tempat penyimpanan file exenya). Terus deteksi apakah eksekusi tersebut sukses atau nggak ( return value). Ini biasanya juga bisa digunakan untuk teknik memanggil sintaks osql sql server untuk membuat atau menggenerate suatu script dari suatu script tertentu. Best Regards, _____ From: Wijanarko, Wahyu [mailto:wahyu.wijanarko@ <mailto:wahyu.wijanarko%40aplcare.com> aplcare.com] Sent: 20 Juni 2007 10:47 To: indoprog-vb@ <mailto:indoprog-vb%40yahoogroups.com> yahoogroups.com Subject: RE: [indoprog-vb] Program dengan Parameter Dear Mas Arie Bagaimana kalau parameter nya di tambahakan tgl misal programnya proses parameternya create DR tgl 01/06/2007 sampai dengan 19/06/2007 untuk data tanggal yang diproses kalau saya jalankan seperti ini c:\proses.exe DR;01/06/2007;19/06/2007;id='10' Thanks Wahyu ________________________________ From: indoprog-vb@ <mailto:indoprog-vb%40yahoogroups.com> yahoogroups.com [mailto:indoprog-vb@ <mailto:indoprog-vb%40yahoogroups.com> yahoogroups.com] On Behalf Of aries Sent: Tuesday, June 19, 2007 04:40 PM To: indoprog-vb@ <mailto:indoprog-vb%40yahoogroups.com> yahoogroups.com Subject: Re: [indoprog-vb] Program dengan Parameter gampang tinggal tambah modul trus buat prosedure sub Main. ex Public Sub Main() Dim arrCommand() As String arrCommand = Split(Command$, ";") MsgBox arrCommand(0) & " -> " & arrCommand(1) End Sub jangan lupa startup objectnya diganti menjadi Sub Main atw kalo parameter yang ingin dilewatkan beda2x lebih kurang jadinya seperti ini (contoh): Public Sub Main() Select Case UCase$(Command$) Case "/TR" 'transfer data 'prosedure transfer Case "/ST" 'shutdown 'prosedure shtudown Case "/A" Case "/B" Case Else End Select End Sub jadi pemanggilannnya seperti ini nama_program /TR nama_program /ST dst "Wijanarko, Wahyu" <wahyu.wijanarko@ <mailto:wahyu.wijanarko%40aplcare.com> aplcare.com <mailto:wahyu.wijanarko%40aplcare.com> > wrote: Dear All, Membuat program VB dengan menjalankan di dos dengan parameter misal Programnya Proses jadi pada saat di jalankan saya jalankan di dos dengan parameter tanggal dari sampai dengan dengan seperti ini c:\proses 01\06\2007;18\06\2007. kalau yang pernah buat bisa share ke saya. Thanks Wahyu CONFIDENTIALITY NOTICE: This communication (which term shall include any attachments) contains information which is confidential and proprietary in nature and the copyright in which belongs to Interpharma Asia Pacific or a subsidiary of Interpharma Asia Pacific (hereafter referred to jointly and singularly as Interpharma) or a third party. This communication is intended solely for the individual to whom it is addressed. If you are not the intended recipient of this communication, you may not disseminate, distribute, copy or otherwise disclose or use the contents of this communication without the written authority of Interpharma. If you have received this communication in error, please delete and destroy all copies and kindly notify the sender by return email or telephone immediately. Thank you. Interpharma makes no representations or warranties in respect of the integrity of this communication, including but not limited to any warranty that this communication is free of errors, viruses or other malicious code, interception or interference. __________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information, visit http:\\www.messagelabs.com\stats.asp [Non-text portions of this message have been removed] --------------------------------- Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. [Non-text portions of this message have been removed] __________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit http://www.messagel <http://www.messagel <http://www.messagelabs.com/stats.asp> abs.com/stats.asp> abs.com/stats.asp CONFIDENTIALITY NOTICE: This communication (which term shall include any attachments) contains information which is confidential and proprietary in nature and the copyright in which belongs to Interpharma Asia Pacific or a subsidiary of Interpharma Asia Pacific (hereafter referred to jointly and singularly as Interpharma) or a third party. This communication is intended solely for the individual to whom it is addressed. If you are not the intended recipient of this communication, you may not disseminate, distribute, copy or otherwise disclose or use the contents of this communication without the written authority of Interpharma. If you have received this communication in error, please delete and destroy all copies and kindly notify the sender by return email or telephone immediately. Thank you. Interpharma makes no representations or warranties in respect of the integrity of this communication, including but not limited to any warranty that this communication is free of errors, viruses or other malicious code, interception or interference. __________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information, visit http:\\www.messagelabs.com\stats.asp [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
