-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto PostYahoo! Messenger(76)
 by jfoc
 on 07.Sep at 00:11
goto PostSelamat Hari Raya Idul Fitri 1 Syawal 1431 H(1)
 by LuriDarmawan
 on 06.Sep at 19:52
goto PostRepair data Firebird gimana sih????(0)
 by adindarmawan
 on 06.Sep at 14:15
goto PostDelphi XE(5)
 by simple_code
 on 06.Sep at 10:09
goto PostBUBER: Bewara Delphi-ID.ORG & Pascal-ID.ORG (Local Bandu(17)
 by Manz
 on 06.Sep at 09:55
goto Postload potongan image ke Timage?(0)
 by ianhade
 on 06.Sep at 09:03
goto Post(Ask) TComport(6)
 by andraones
 on 05.Sep at 23:49
goto PostQuery penjumlahan data and sort Date(3)
 by cyber_hecker
 on 05.Sep at 14:10
goto PostTanya cara input dari dbgrid ke stringgrid atau yang lainnya(1)
 by budi_sleman
 on 05.Sep at 09:00
goto PostInstaller inno setup dengan access sebagai databaenya.(1)
 by haidarfaz
 on 03.Sep at 22:56
goto PostPemutar Video utk extensi VOB(2)
 by mat_koder
 on 03.Sep at 21:34
goto PostProblem dengan master detail(3)
 by phyto
 on 03.Sep at 00:15
goto PostGoogle Earth di Delphi(1)
 by phyto
 on 02.Sep at 23:19
goto PostMembuat Serial Number di program yang kita buat ..??(5)
 by andrians
 on 02.Sep at 17:19

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
s0t4Offline
Location:
Post subject: Menampilkan Log PABX ke dalam Tabel  PostPosted: 20/Jul/2010 11:29
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
Para Master,


Aq mau menampilkan data log PABX ke dalam tabel secara realtime, caranya gimana ya?


Sementara ini aq cuma bisa save log ke file TXT. Aku koneksi PABX pakai component Comport (dr Dejan Crnila).
dengan memanfaatkan even ComPortRxChar.

      Code:

procedure TForm1.ComPortRxChar(Sender: TObject; Count: Integer);
begin
    ComPort.ReadStr(Str, Count);
    write(myFile, str)
end;






Thnks


[/code][/code]
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 20/Jul/2010 12:53
onApaAdanya


Joined: 15-Mar-2005
Posts: 1534
Location: here
pada baris yg tertulis : " write(myFile, str)"
dimodifikasi dengan code2 untuk insert database.

dipastikan juga juga, str ini bersifat string atau karakter.
parsing teks juga sangat mungkin dilakukan

Tetap SemangaT

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 20/Jul/2010 14:20
onElite


Joined: 18-Mar-2006
Posts: 1449
Location: New York Arto
Betul kata big bos ulil : dan teks yg dihasilkan cenderung bersifat columnar (walau berformat text), artinya lebar (jumlah) teks tiap field tetap jadi gampang di parser berdasarkan lebar masing2 kolom



======================================================================


aku punya product Telpon (PABX) Logger.. udah lengkap dengan pustaka (library) type2 / merek PABX......

jadi tinggal pilih type / merek PABX anda, dan catatan telpon akan ke catat ke database (mysql, interbase), dan lengkap dengan Report berbagai macam format

kalo berminat memilik source nya PM aku...

Sorry Numpang Ngiklan....

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu
 
 View user's profile Send private message  
Reply with quote Back to top
sinagaOffline
Location:
Post subject:   PostPosted: 20/Jul/2010 17:35
onNovice


Joined: 29-Jun-2010
Posts: 8

Status: Offline
Daku punya saran gini:
    1. Setelah lognya kebaca di lewat comport buat function untuk memparsing karena biasanya lognya tidak selalu sama. Antisipasi juga log error dari PABX. Entar kalau udah diparsing baru manggil fungsi insert ke db.
    2. Cara lain tampung sj logx ke text file lalu buat timer untuk membaca (looping) file text yang falid sj yang dimasukkan ke db.


Salam

Sinaga
newbie 4ever
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 21/Jul/2010 13:35
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
Thnks all...




mas_kofa kok gak bisa di PM ya ?? Very Happy


by theway....

aq sudah bisa simpan log ke database (pakai cara2 akal-akalan pemula...... Razz )


caranya :
1. Log dari PABX aq simpan ke memo
2. Baru pada even on memo.change, data perbaris aq parsing terus aq simpan ke database....
 
 View user's profile Send private message  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 21/Jul/2010 19:41
onElite


Joined: 18-Mar-2006
Posts: 1449
Location: New York Arto
seep kalo udah bisa :

jgn lupa yg di memo disempen ja ke file txt sebelum di clear / delete / aplikasi ditutup,
dikhawatir kan jika ada kegagalan dalam penyimpanan ke db...sehingga jika hal itu terjadi kita masih punya data mentah nya di file tsb....

karena setauku data yg sudah di keluarkan dr PABX akan di hapus dari memori PABX...kalo kita gak punya backup nya berarti kita kehilangan data penting tersebut...(jika terjadi kegagalan penyimpanan ke db)

[to : admin] emang semenjak DI hidup kembali fitur PM kek nya gak bisa dipake..

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 22/Jul/2010 12:01
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
thnks,


Aku sudah simpen log ke file & database, untuk jaga-jaga...
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 29/Jul/2010 14:38
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
Para master.... nyambung lagi nih.....



aq sudah bisa simpan log ke database tapi kok banya yang hilang ya? (aq bandingin dengan log file txt-nya, bisa sampai 10-20 baris). Jadinya tiap hari harus update database secara manual deh.. diambil dari file txt.


Aku pakai akal-akalan gini.....
      Code:

.
.
procedure TFserver.ComPortRxChar(Sender: TObject; Count: Integer);
var str:string;
begin
    ComPort.ReadStr(Str, Count);

    //simpan ke file txt
    if checkbox2.Checked then write(myFile,str);

    //kumpulkan data untuk disimpan ke dtabase...
    data:=data+str;
end;

procedure TFserver.Timer1Timer(Sender: TObject);
begin
   memo1.Text:=data;
   data:='';
end;

procedure TFserver.Memo1Change(Sender: TObject);
var i,baris:integer;
   ALineStr: String;
   AValidData:boolean;
begin
   baris:=memo1.Lines.Count;
   for i:=0 to baris-1 do
   begin
       ALineStr:= Memo1.Lines[i];

       //filter data yang valid saja   
       AValidData := (ALineStr[1] in ['0'..'9']) and (ALineStr[2] in ['0'..'9']) and (length(ALineStr)>=panjang_data);

      //simpan log ke database jika checkbox dbase dicawang
      if checkbox1.Checked then
      begin
         if AValidData then
         begin
             with Zquery1 do
             begin
                   
                     ... simpan data ke dtabase.......

             end;
         end;
      end;
   end;
end;




ceritanya data yang mau disimpan ke database ditampung dulu ke variabel 'data' dan setiap waktu tertentu (ontimer) diambil disimpan ke memo... baru disimpan ke database....



ada yang bisa bantu gak (mas kofa mungkin..... Very Happy )


kayaknya masalah saat PABX kirim log ke port tidak per baris sekaligus ya??




Thnks
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 29/Jul/2010 15:41
onApaAdanya


Joined: 15-Mar-2005
Posts: 1534
Location: here
mmmm....

krn onTimer,
itu mungkn jadi penyebabnya kali..
cmiiw

apa tidak begini saja ?
setiap membaca ada CR/LF, baru kemudian disimpen ke dalam database.

ini analogi saya terhadap aplikasi2 yg mbaca sms dr port modem
klo ditriger berdasar waktu, sering meleset.
triger karakter bisa apa aja, mungkin bisa CR, LF, Tab, ESC, etc


lagi lagi... cmiiw

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 29/Jul/2010 16:01
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
kalau pakai comport dipakai di even apanya ya??? maklum newbie... Very Happy




thnks
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 29/Jul/2010 16:37
onApaAdanya


Joined: 15-Mar-2005
Posts: 1534
Location: here
hhhmmm... sy ga paham, even apa yang ada disana.
(diriku sdh ga mudeng koding)

cuman sy nerusin dari code yang dikau tulis,
kayanya bisa dicegat setelah baris code 'ComPort.ReadStr(Str, Count);'

jk ada karakter yg tadi itu, maka ....
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 30/Jul/2010 03:07
onElite


Joined: 18-Mar-2006
Posts: 1449
Location: New York Arto
sori baru ngongol :

logika yg aku pake,
1. data dari pabx aku simpan mentah2 ke memo....
2. trigger aku ambil dari adanya penambahan baris di memo...
3. dan pertambahan baris tersebut baru disimpan ke database...

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 30/Jul/2010 08:27
onApaAdanya


Joined: 15-Mar-2005
Posts: 1534
Location: here
yg nomor 2+3 dari paparan @mas_kofa itu idem dgn apa yg daku sampein sebelumnya.
cuman sy berkecenderungan, nyegatnya bukan di memo, tp cegat di waktu mbaca karakter dr comport.
dengan demikian, jk kemudian ditampilkan di memo, maka yg tampil dan yg disimpan bisa dianggap sah
hihihihihii...

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 02/Aug/2010 10:55
onNovice


Joined: 01-Jul-2010
Posts: 14

Status: Offline
Sory ni mas tanya lagi... Very Happy


Triger yg dr mas kofa u/ penambahan baris memo dari mana ya?
apa di memo on change??

barisawal:=0;

....

di ComPortRxChar(Sender: TObject; Count: Integer);
memo aq tambah datanya
ComPort.ReadStr(Str, Count);
memo1.text:=memo1.text+str;
barisbaru:=memo1.lines.count;

....


di memo1change aq isi

if barisbaru>barisawal then
simpandata ke dbase
barisawal:=barisbaru;


[/code]


Aq sudah coba gak berhasil.... (yg masuk dbase cuma sepotong... padahal data baris di memo sdh benar...)..






thnks
 
 View user's profile Send private message  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 02/Aug/2010 11:50
onElite


Joined: 18-Mar-2006
Posts: 1449
Location: New York Arto
iya...bisa lewat onchange .... jika ada penambahan baris....maka proses...

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |