Repository.DataWarehouse.SaveRawDataSet: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}
Saves the contents of the passed [[RawDataSet Class|RawDataSet]] instance to the Synthesis Repository that this [[Repository Class|Repository]] instance references.
== Method Syntax==
{{APIName|Public Function '''SaveRawDataSet'''(}}
{{APIPrefix|ByVal}}
{{APIName|DataSet}}
{{APIName|As [[RawDataSet Class|RawDataSet]])}}
{{APIPrefix|As Boolean}}<br>
{{APIComment|Saves the raw data set in the repository.}}


== Parameters ==
'''DataSet'''
{{APIComment|The raw data object.}}


== Usage Example ==
<onlyinclude>Adds a new Synthesis Data Warehouse (SDW) data collection to the associated Repository object. Returns a '''Boolean''' value; when true, indicates a successful save.</onlyinclude>
{{APIComment|Code Block}}


'{{APIComment|Declare a new repository connection class.}}
== Syntax ==
{{APIPrefix|Private WithEvents MyRepository As [[New Repository]]}}
  '''.DataWarehouse.SaveRawDataSet'''(''DataSet'')
'{{APIComment|Connect to the Synthesis repository.}}
{{APIPrefix|Dim}}Success{{APIPrefix|As Boolean}}={{APIPrefix|False}}
  Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
  '{{APIComment|Declare and populate a [[RawData Class|RawData]] object and a [[RawDataSet Class|RawDataSet]]. In this example, the first Incident information is used.}}
{{APIPrefix|Dim}}RD{{APIPrefix|As New}} [[RawData Class|RawData]]
'{{APIComment|(Populate relevant RawData variables in RD.)}}
{{APIPrefix|Dim}}RDSet{{APIPrefix|As New [[RawDataSet Class|RawDataSet]]}}
  RDSet.AddDataRow(RD)
'{{APIComment|Save the raw data to the Synthesis repository.}}
{{APIPrefix|Dim}}SuccessSaveRawData{{APIPrefix|As Boolean}}
  SuccessSaveRawData = MyRepository.[[Repository.SaveRawDataSet|SaveRawDataSet]](RDSet)


=== Reformatted Usage Example===
=== Parameters ===
{{APIComment|Declare a new repository connection class.}}
''DataSet''
        Private WithEvents MyRepository As [[New Repository]]
:Required. The [[RawDataSet Class|RawDataSet]] object that represents the Synthesis Data Warehouse (SDW) data collection.


{{APIComment|Connect to the Synthesis repository.}}
== Example ==
        Dim Success As Boolean = False
'''VBA'''
        Success = MyRepository.[[Repository.ConnectToRepository|ConnectToRepository]]("RepositoryFileNamePath")
{{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
{{APIComment|'Add code to create and populate a new data collection.}}
  {{APIPrefix|Dim}} RDSet {{APIPrefix|As New}} RawDataSet
  {{APIComment|...}}
{{APIComment|'Add the data collection to the repository's SDW.}}
  {{APIPrefix|Call}} MyRepository.DataWarehouse.SaveRawDataSet(RDSet)


{{APIComment|Declare and populate a [[RawData Class|RawData]] object and a [[RawDataSet Class|RawDataSet]].  In this example, the first Incident information is used.}}
'''VB.NET'''
        Dim RD As New [[RawData Class|RawData]]
        ({{APIComment|Populate relevant RawData variables in RD. }})
{{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}}
        Dim RDSet As New [[RawDataSet Class|RawDataSet]]
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
        RDSet.AddDataRow(RD)
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
 
{{APIComment|Save the raw data to the Synthesis repository.}}
{{APIComment|'Add code to create and populate a new data collection.}}
        Dim SuccessSaveRawData As Boolean
  {{APIPrefix|Dim}} RDSet {{APIPrefix|As New}} RawDataSet
        SuccessSaveRawData = MyRepository.[[Repository.SaveRawDataSet|SaveRawDataSet]](RDSet)
{{APIComment|...}}
{{APIComment|'Add the data collection to the repository's SDW.}}  
  MyRepository.DataWarehouse.SaveRawDataSet(RDSet)

Latest revision as of 19:20, 9 June 2016

APIWiki.png


Member of: SynthesisAPI.Repository


Adds a new Synthesis Data Warehouse (SDW) data collection to the associated Repository object. Returns a Boolean value; when true, indicates a successful save.

Syntax

.DataWarehouse.SaveRawDataSet(DataSet)

Parameters

DataSet

Required. The RawDataSet object that represents the Synthesis Data Warehouse (SDW) data collection.

Example

VBA 

 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")

 'Add code to create and populate a new data collection. 
  Dim RDSet As New RawDataSet
  ... 

 'Add the data collection to the repository's SDW.  
  Call MyRepository.DataWarehouse.SaveRawDataSet(RDSet)
VB.NET 

 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")

 'Add code to create and populate a new data collection. 
  Dim RDSet As New RawDataSet
 ... 

 'Add the data collection to the repository's SDW.  
  MyRepository.DataWarehouse.SaveRawDataSet(RDSet)