How to do ,About SQL DMO

with like VB code:
 Set objServer = CreateObject("SQLDMO.SQLServer")
 objServer.Connect Text1.Text, Text2.Text, Text3.Text
 For Each objTable In objServer.Databases("NCZZB_XJSH_DATA").Tables
  objTable.Script , "d:\az\" & objTable.Name & ".sql"
  objTable.Triggers.Scpipt , "d:\az\" & objTable.Name & ".sql"
 Next
 objServer.DisConnect
 Set objServer = Nothing

How to Do by Delphi?

I need a DEMO.
LannyKing66Asked:
Who is Participating?
 
halapayaConnect With a Mentor Commented:
same concept use delphis createoleobject method,

var
Server:variant;
Databases:Variant;
Server:=createoleobject('SQLDMO.SQLServer');

Server.Connect "server","login","pass"

for i := 0 to Servers.Databasescount-1 do
begin
'keep on coding :o)
end

same way you use the methods. just define as variants and keep on calling objects methods and properties
for more information on sqldmo methods and object model check the sqldmo.hlp file in mssql7\binn directory..

its quite striaght forward to do with delphi also..
if u need any help drop me a mail on moditha@yahoo.com
0
 
LannyKing66Author Commented:
Help me!
0
All Courses

From novice to tech pro — start learning today.