1:局长的试了一下没成功,生成了文件,但资料好象不对劲
2:联机帮助
Exporting to a File
The following example shows how to export object instance data for two repository objects. You do not need to bracket an export within a transaction. To release the objects after the export concludes, set the objects to nothing.
dim oExp as new Export
dim oMyObj1 as RepositoryObject
dim oMyObj2 as RepositoryObject
dim oRep as new Repository
dim oRoot as RepositoryObject
set oRoot=oRep.Open "SERVER=MyServer;DATABASE=MyDB;UID=sa;PWD=MyPassword;"
set oMyObj1=oRep.Object(objid1)
set oMyObj2=oRep.Object(objid2)
oExp.add oMyObj1
oExp.add oMyObj2
oExp.Export "c:\temp\myXmlFile.xml", INDENTATION
Set oMyObj1=Nothing
Set oMyObj2=Nothing
Set oRoot=Nothing
Set oRep=Nothing
Set oExp=Nothing