Arsip: edit source

 
user image
more 13 years ago

nurez

mohon maff, tmn2... gi binun nech.. nga bisa diedit recordnya..
begin
adoquery1.sql.text:=('select tbbuki.uidlok from tbbuki left outer join tblmstusr on tbbuki.uidsgn = tblmstusr.mstusr');
adoquery1.open;
while not adoquery1.eof do  begin
adotable1.close;
adotable1.open;
adotable1.Edit;
adotable1.Fieldvalues['mstlok']:= adoquery1.Fieldvalues['uidlok'];
adotable1.post;
adotable1.close;
adoquery1.Next;
end;end;
mohon bantuannya yha :) makasih
user image
more 13 years ago

ImanD

aku jg ingung fungsi looping si adoquery buat apa caused yg di edit cuman record yg pertama doang dari adotable1 kenapa g lgsg nunjuk last az dari adoquery.....
user image
more 13 years ago

nurez

harusnya sich semuanya yg di looping.. klo smuanya gmn kang imand.? makasih
user image
more 13 years ago

ImanD

algoritmanya: loop tablenya kemudian ambil criteria dari field u/ diambil nilai yang akan di update pada table oleh query trus post... atawa lgsng az pke sql u/ updatenya
user image
more 13 years ago

nurez

klo spt ini gmn..? dh spt algoritma diatas.? with ADOQUERY1 do begin SQL.TEXT:=('SELECT tbbuki.UIDLOK FROM tbbuki LEFT OUTER JOIN TBLMSTUSR ON tbbuki.UIDSGN = TBLMSTUSR.MSTUSR'); open; while not Eof do begin with ADOTable1 do begin CLOSE; Edit; open; ADOTable1.FieldValues['mstlok']:= ADOQUERY1.FieldValues['UIDLOK']; Post; close; errornya "cannot perform ..data cloesed.."
user image
more 13 years ago

zieborg

hi..hi.., nih kayaknya terusan dari posting ini http://pascal-id.org/dpr/index.php?name=PNphpBB2&file=viewtopic&t=3369&highlight=dbf+inner+join belum ketemu juga?? yang saya tangkep dari kode2 sebelumnya sih maunya seperti ini

adoquery1.sql.text:='select UIDSGN,UIDLOK from tbbukti';
adoquery1.open;
adotable1.open;
adotable1.disablecontrols;
try
  while not adoquery1.eof do  begin
    if adotable1.locate('MSTUSR',adoquery1.fiedByName('UIDSGN').AsString,[loCaseInsensitive]) then
    begin
      adotable1.Edit;
      adotable1.FieldByName('mstlok').Asstring:= adoquery1.FieldByName('UIDSGN').AsString;
      adotable1.post;
    end;
    adoquery1.Next;
  end;
finally
  adotable1.enablecontrols;
end;
end;
Catatan : adotable1.tablename = 'TBLMSTUSR'
user image
more 13 years ago

nurez

hasilnya hanya 3 rec..?
user image
more 13 years ago

ImanD

@nurez klo masalah jumlah recor ya itu tergantung am hasil 'select UIDSGN,UIDLOK from tbbukti'
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com