Mau konsultasi DELPHI
mungkin aja di bisa di bantu
Telp 62 813.1401.3305
/ 62 817. 910.8005

..<< More Info >>..

Thursday 19 June 2008

Create Table By Delphi Programe

table77.Close;
table77.DatabaseName := '\SysPro\_Rtxt\';
if directoryexists( 'c:\temp\' ) then
table77.DatabaseName := 'c:\temp\' ;
if directoryexists( 'c:\temp\syspro\' ) then
table77.DatabaseName := 'c:\temp\syspro\' ;

//pomast.orddate, pomast.pono, pomast.vendclass, pomast.vendorid, ');
table77.TableType := ttParadox;
table77.TableName := xfile2;
table77.FieldDefs.Clear;
table77.FieldDefs.Add('PoNo', ftstring, 8, False);
table77.FieldDefs.Add('Orddate', ftdate, 0, False);
table77.FieldDefs.Add('VendClass', ftstring, 4, False);
table77.FieldDefs.Add('VendorID', ftstring, 8, False);
table77.IndexDefs.clear;
table77.IndexDefs.add ('','pono',[ixPrimary]);
//table77.IndexDefs.add ('idex01','bluePRT',[ixCaseInsensitive]);

table77.CreateTable;
table77.Active := true ;

Copy or Append from other table
with delphi command function :



BatchMove1.Destination := table77 ;
BatchMove1.Source := table1;
BatchMove1.mappings.clear;
BatchMove1.Mappings.Add('PoNo=PoNo');
BatchMove1.Mappings.Add('OrdDate=OrdDate');
BatchMove1.Mappings.Add('VendClass=VendClass');
BatchMove1.Mappings.Add('VendorId=VendorId');
//BatchMove1.Mode := batcopy ; //copy table biasa
BatchMove1.Mode := batAppend ; //append table
//showmessage ( batchmove1.mappings.Text+'<<<' ) ;
BatchMove1.execute;

0 comments:

Digg!
Add to Technorati Favorites Join My Community at MyBloglog! Programming Blogs - Blog Catalog Blog Directory online counter
 

Bursa 2000 | Find Better Jobs