ya pak, di server ada program kecil untuk upload..
ini contoh syntax nya..
di open event :
li_app = fileopen("app.ini",LineMode!)
if li_app = -1 then
messagebox("PESAN","File parameter untuk Upload tidak diketemukan.")
return
end if
do while true
fileread(li_app,ls_file)
ls_file = trim(ls_file)
if isnull(ls_file) or len(ls_file) = 0 or ls_file = "end" then
exit
end if
i++
is_app[i] = ls_file
loop
li_file = upperbound(is_app)
if li_file = 0 then
messagebox("PESAN","File parameter untuk Upload tidak diketemukan.")
return
end if
for i = 1 to li_file /// tampilkan ini file ke listbox
lb_file.additem(is_app[i])
next
st_path.text = gs_srv
select isnull(versi,0), tgl into :li_ver, :ld_app from main ;
st_ver.text = "Versi " + string(li_ver) + " ( " + string(ld_app,"dd/mmm/yyyy
hh:mm") + " )"
di clicked event cb_proses :
st_pro.text = "SEDANG PROSES....."
delete from prg ;
COMMIT ;
FOR i = 1 to upperbound(is_app)
b_lib = blob("")
yield()
ls_file = is_app[i]
if fileexists(ls_file) = FALSE then
rollback ;
messagebox( "Open Error",ls_file+"~r~rFile tidak diketemukan.")
return
end if
ll_filelength = filelength( ls_file)
li_filenum = fileopen(ls_file, streammode!)
if li_filenum = -1 then
rollback ;
messagebox( "Open Error","File open error occurred while tring to open " +
ls_file )
return
end if
if ll_filelength > 32765 then
if mod( ll_filelength , 32765 ) = 0 then
loops = ll_filelength / 32765
else
loops = ( ll_filelength / 32765 ) + 1
end if
else
loops = 1
end if
for inx = 1 to loops
fileread( li_filenum , b_read )
b_lib = b_lib + b_read
next
fileclose( li_filenum )
select count(*) into :li_c from prg where namafile = :ls_file ;
f_err("")
if li_c = 1 then
updateblob prg
set object = :b_lib
where namafile = :ls_file ;
f_err("")
else
// insert into prg ( namafile, versi, tgl )
insert into prg ( namafile ) values ( :ls_file ) ;
f_err("")
updateblob prg
set object = :b_lib
where namafile = :ls_file ;
f_err("")
end if
NEXT
setpointer(arrow!)
// jika semuanya sukses, increment versi
select count(*) into :li_c from main ;
if li_c = 0 then
insert into main ( versi, tgl ) values ( 1, GETDATE() ) ;
else //sudah ada, update
select isnull(versi,0) into :li_ver from main ;
li_ver++
update main set versi = :li_ver, tgl = GETDATE() ;
end if
f_err("")
if sqlca.sqlcode = 0 then
COMMIT;
messagebox("PESAN","Aplikasi telah di-Upload ke Server.")
else
f_err("")
end if
close(parent)
contoh isi app.ini :
main1.pbd
transaksi.pbd
report.pbd
utiliti.pbd
end
----- Original Message -----
From: NASRULLAH ARUL
To: [email protected]
Sent: Monday, June 27, 2011 8:23 AM
Subject: Bls: [indopb] jalankan aplikasi pb 11 exe di jaringan agar lebih
cepat
pa rubah file pbd nya ke blob gimana yah ...? apakah server perlu di psang
scrip juga? kan cuma copy pdb ke bob jika ada update tan baru..? baru di client
cek ke table tersebut apakah ada update baru atau tidak...? klo bisa di prinst
screan dong pa..?ma kasih...
------------------------------------------------------------------------------
Dari: Setiawan Santosa <[email protected]>