Click or drag to resize

DbCreate Function

Create new file through the specified RDDs

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION DbCreate(
	 cName AS USUAL,
	 aStruct AS USUAL,
	 cRddName AS USUAL,
	 lNew AS USUAL,
	 cAlias AS USUAL,
	 cDelim AS USUAL,
	 lJustOpen AS USUAL,
	 aHidden AS USUAL
) AS LOGIC

Parameters

cName
Type: USUAL
Name of the file to create. When no extension is specified then the default extension for the RDD will be used.
aStruct
Type: USUAL
Array with structure to use when creating the file.
cRddName
Type: USUAL
lNew
Type: USUAL
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: USUAL
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: USUAL
The delimiter for fields within a delimited database file. The default is a NULL string
lJustOpen
Type: USUAL
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.
aHidden
Type: USUAL
A one-dimensional array with the names of RDDs from which the main RDD inherits special functionality.

Return Value

Type: Boolean
TRUE when succesfull, otherwise FALSE. When an error has occurred then you can retrieve that error from RuntimeState.LastRddError.
See Also