Arsip: DTS MSSQL lewat delphi

 
user image
more 13 years ago

blurry

rekans, gimana ya cara melakukan export/import table yg biasa dilakukan dg DTS (Data Transformation Services) di SQL Server tapi lewat delphi bukan lewat wizard yg ada di SQL Server manager? thanx in advance!! :lol: :roll: :lol:
user image
more 13 years ago

zieborg

maksud kamu gimana? mau menjalankan DTS lewat delphi atau mau bikin program yang mirip kayak DTS? kalau mau menjalankan DTS lewat delphi bisa lewat OLE, contohnya :

procedure TForm1.Button1Click(Sender: TObject);
var
  pkg: Variant;
  i:integer;
begin
  pkg:= CreateOleObject('DTS.Package');
  try
    pkg.LoadFromSQLServer('Server','sa',,,,,,'coba','');
    for i := 1 to pkg.steps.count do
      pkg.steps.Item(i).executeinMainThread := True;
    pkg.FailOnError := true;
    pkg.Execute;
  except
    on E: Exception do
    begin
      showmessage('Ada kesalahan = ' + E.Message);
      exit;
    end;
  end;
  pkg.uninitialize;
  pkg:= unassigned;
  showmessage('Proses selesai!');
end;
jangan lupa uses ComObj parameter LoadFromSQLServer sbb:

LoadFromSQLServer(ServerName,[ServerUserName],[ServerPassword],[Flags],[PackagePassword],
[PackageGuid],[PackageVersionGuid],[PackageName],[pVarPersistStgOfHost])
user image
more 13 years ago

maulaku

WinExec('dtsrun.exe /S<servername> /U<username> / P<password> /N<dts
package>',sw_show); 
di sql 2005 tidak jalan khusu sql 2000
user image
more 13 years ago

blurry

terimakasih zieborg sama maulaku, maaf saya telat ngereplaynya... maksud saya gini, saya ingin mengimport file text menjadi tabel dalam database lewat delphi, file text tsb terstruktur spt database hanya saja dalam format text jadi gmn cara bikin procedure/function yg inputnya: filename yg berupa textfile outputnya: dalam database sudah bertambah tabel yg isinya textfile tadi klo yg dari zieborg saya coba muncul kesalahan: SQL server doest exist or access denied thx, maaf skli lg
user image
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com