ExportDatabase.DoExport Method
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Creates or opens a database that contains data from a Windows SharePoint list.
expression.DoExport(fUseExistingDB)
Parameters
expression
An expression that returns an ExportDatabase Control object.
fUseExistingDB
true to open an existing database; false to create a new database. The default is false.
Remarks
Set the ExportDatabase.ListID Property property before calling the DoExport method to specify the list that contains the data to export. Set the ExportDatabase.ViewID Property property to specify the list view to use for the export. Set the ExportDatabase.ApplicationName Property property to specify the database application to use.
The DoExport method does not provide a built-in interface for specifying an existing database to open, or whether data in the database is copied from or linked to the list data. You must provide your own interface.
Example
The following code creates a new database using data from the list specified by strListID:
function ExportToDatabase(strListID)
{
var L_ExportDBFail_Text="Export to database failed.";
try
{
var ExpDatabase;
ExpDatabase=new ActiveXObject("SharePoint.ExportDatabase");
ExpDatabase.ListID=strListID;
ExpDatabase.DoExport();
ExpDatabase=null;
}
catch(e)
{
alert(L_ExportDBFail_Text);
return;
}
}