DescriptionInitializes the data source object from another data source object or from a string. SyntaxFunction SetDS( ds )Parametersvariant ds - the datasource prototypestring - a file path to the database resource for file based databases; object - an initialized DS object from which to copy the settingsReturn Valuesnone
Function SetDS( ds )
ds
ExamplesYou can set output table using two methods: setting the table name (assuming you are connected to a database) - (a) setting the entire data source - (b):If you are writing script outside TextConverter the API looks like this: Set DS = TextConverter.GetOutputDS()DS.table = "tablename" ) ‘- (a)DS.SetDS( "c:\data\output.dbf" ) ‘- (b) If you are writing script inside TextConverter it looks like this:This.DSOut.table = "tablename" ) ‘- (a)This.DSOut.SetDS( "c:\data\output.dbf" ) ‘- (b) An Excel file is also considered as a database, so you can set the worksheet as: Set DS = TextConverter.GetOutputDS() DS.table = "worksheetname" ) ‘- (a)DS.SetDS( "...\file.mdb:worksheetname" ) ‘- (b) Additional examples: 'Sample 1 DS.SetDS( ds1 ) 'ds1 - pre initialized data source object 'Sample 2 DS.SetDS( "c:\data\access.mdb" ) DS.table = "Table1" 'Sample 3 DS.SetDS( "c:\data\input.csv" )See also
Set DS = TextConverter.GetOutputDS()
DS.table = "tablename" ) ‘- (a)
DS.SetDS( "c:\data\output.dbf" ) ‘- (b)
This.DSOut.table = "tablename" ) ‘- (a)
This.DSOut.SetDS( "c:\data\output.dbf" ) ‘- (b)
DS.table = "worksheetname" ) ‘- (a)
DS.SetDS( "...\file.mdb:worksheetname" ) ‘- (b)
'Sample 1
DS.SetDS( ds1 ) 'ds1 - pre initialized data source object
'Sample 2
DS.SetDS( "c:\data\access.mdb" )
DS.table = "Table1"
'Sample 3
DS.SetDS( "c:\data\input.csv" )
GetAsStringDS