Click or drag to resize

VoDbCreate Function (String, Array, Type, Logic, String, String, Logic, Logic)

X#
Create new file through the specified RDDs

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION VoDbCreate(
	cName AS STRING,
	aStruct AS ARRAY,
	oRddType AS Type,
	lNew AS LOGIC,
	cAlias AS STRING,
	cDelim AS STRING,
	lKeep AS LOGIC,
	lJustOpen AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

cName
Type: String
Name of the file to create. When no extension is specified then the default extension for the RDD will be used.
aStruct
Type: Array
Array with structure to use when creating the file.
oRddType
Type: Type
Type of the RDDs to use when creating the file
lNew
Type: Logic
TRUE opens the database file in a new work area (first available). FALSE opens it in the current work area. lNew is useful only when lOpen has a value of TRUE. The default is FALSE.
cAlias
Type: String
The alias to be associated with the work area where the file is opened. Within a single thread, X# will not accept duplicate aliases. cAlias is useful only when lOpen has a value of TRUE. The default alias is the filename without extension
cDelim
Type: String
The delimiter for fields within a delimited database file. The default is a NULL string
lKeep
Type: Logic
TRUE specifies that the file should remain open after creating. FALSE closes the file.
lJustOpen
Type: Logic
TRUE specifies that an existing database file be opened. FALSE specifies that that a new database file be opened. The default is FALSE. This can be used to open existing SDF and delimited files, which do not have a structure in the header ? in which case, an empty aStruct should be used.

Return Value

Type: Logic
TRUE when succesfull, otherwise FALSE. When an error has occurred then you can retrieve that error from RuntimeState.LastRddError.
Remarks
There are several overloads of this method. This overload uses the RDD name to find the RDD type.
Tip Tip
The difference between VoDbCreate and CoreDb.Create is that VoDbCreate takes a ARRAY parameter and convertes that to a RddFieldInfo[] array
See Also