Página 1 de 1

Create Physical DBF files

Publicado: Jue Oct 12, 2006 10:20 am
por david fung
I tried to create a physical DBF file with the following but failed !
Any comment ?
METHOD Button1Click( oSender ) CLASS Tform1
Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
{"KEYFLD2", "D", 8, 0}, ;
{"FLD3", "C", 20, 0} }
Local cFile := "MyClient.DBF", lDbf
WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
:afields := afieldlist
END WITH
RETURN Nil
Thanks.
David

Create Physical DBF files

Publicado: Jue Oct 12, 2006 10:37 am
por Ingo Junge-Herrmann
David,
TDbfDataSet():Create() is a constructor of the DataSet object not the creator
of the dbf-file.
Use
DBCREATE(cFile,aFieldList)
to build a new database.
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>I tried to create a physical DBF file with the following but failed !
>Any comment ?
>
>METHOD Button1Click( oSender ) CLASS Tform1
> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
> {"KEYFLD2", "D", 8, 0}, ;
> {"FLD3", "C", 20, 0} }
> Local cFile := "MyClient.DBF", lDbf
>
> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
> :afields := afieldlist
> END WITH
>
>RETURN Nil
>
>
>Thanks.
>David
>
>

Create Physical DBF files

Publicado: Jue Oct 12, 2006 10:37 am
por Ingo Junge-Herrmann
David,
TDbfDataSet():Create() is a constructor of the DataSet object not the creator
of the dbf-file.
Use
DBCREATE(cFile,aFieldList)
to build a new database.
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>I tried to create a physical DBF file with the following but failed !
>Any comment ?
>
>METHOD Button1Click( oSender ) CLASS Tform1
> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
> {"KEYFLD2", "D", 8, 0}, ;
> {"FLD3", "C", 20, 0} }
> Local cFile := "MyClient.DBF", lDbf
>
> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
> :afields := afieldlist
> END WITH
>
>RETURN Nil
>
>
>Thanks.
>David
>
>

Create Physical DBF files

Publicado: Jue Oct 12, 2006 10:55 am
por david fung
Dear Ingo,
Will this code work when I use different RDD ? such as CDX & ADS ?
David
Ingo Junge-Herrmann wrote:
> David,
>
> TDbfDataSet():Create() is a constructor of the DataSet object not the creator
> of the dbf-file.
> Use
>
> DBCREATE(cFile,aFieldList)
>
> to build a new database.
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> I tried to create a physical DBF file with the following but failed !
>> Any comment ?
>>
>> METHOD Button1Click( oSender ) CLASS Tform1
>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>> {"KEYFLD2", "D", 8, 0}, ;
>> {"FLD3", "C", 20, 0} }
>> Local cFile := "MyClient.DBF", lDbf
>>
>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>> :afields := afieldlist
>> END WITH
>>
>> RETURN Nil
>>
>>
>> Thanks.
>> David
>>
>>
>

Create Physical DBF files

Publicado: Jue Oct 12, 2006 10:55 am
por david fung
Dear Ingo,
Will this code work when I use different RDD ? such as CDX & ADS ?
David
Ingo Junge-Herrmann wrote:
> David,
>
> TDbfDataSet():Create() is a constructor of the DataSet object not the creator
> of the dbf-file.
> Use
>
> DBCREATE(cFile,aFieldList)
>
> to build a new database.
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> I tried to create a physical DBF file with the following but failed !
>> Any comment ?
>>
>> METHOD Button1Click( oSender ) CLASS Tform1
>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>> {"KEYFLD2", "D", 8, 0}, ;
>> {"FLD3", "C", 20, 0} }
>> Local cFile := "MyClient.DBF", lDbf
>>
>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>> :afields := afieldlist
>> END WITH
>>
>> RETURN Nil
>>
>>
>> Thanks.
>> David
>>
>>
>

Create Physical DBF files

Publicado: Jue Oct 12, 2006 12:49 pm
por Ingo Junge-Herrmann
David,
here is the documentation of DBCREATE()
DBCREATE()
Creates an empty database from a array.
Syntax
DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
[<cAlias>]) --> NIL
Arguments
<cDatabase> Name of database to be create
<aStruct> Name of a multidimensional array that contains the a database structure
<cDriver> Name of the RDD
<lOpenNew> 3-way toggle to Open the file in New or Current workarea:
NIL The file is not opened.
True It is opened in a New area.
False It is opened in the current area.
<cAlias> Name of database Alias
Returns
DBCREATE() always returns NIL.
Description
This function creates the database file specified as <cDatabase> from the
multidimensional array <aStruct>.If no file extension is use with <cDatabase>
the .DBF extension is assumed. The array specified in <aStruct> must follow
a few guidelines when being built prior to a call to DBCREATE():
- All subscripts values in the second dimension must be set to proper values
- The fourth subscript value in the second dimension - which contains the
decimal value-must he specified. even 1kw nonnumeric fields.
- The second subscript value in the second dimension-which contains the field
data type-must contain a proper value: C, D, L, M or N It is possible to
use additional letters (or clarity (e.g., 'Numeric' for 'N'): however, the
first letter of this array element must be a proper value.
The DBCREATE( ) function does not use the decimal field to calculate the
length of a character held longer than 256. Values up to the maximum length
of a character field (which is 65,519 bytes) are stored directly in the database
in the length attribute if that database was created via this function. However,
a file containing fields longer than 256 bytes is not compatible with any
interpreter.
The <cDriver> parameter specifies the name of the Replaceable Da- tabase
Driver to use to create the database. If it is not specified, then the Replaceable
Database Driver in the current work area is tised. The <lOpenNew> parameter
specifies if the already created database is to be opened, and where. If
NIL, the file is not opened. If True, it is opened in a New area, and if
False it is opened in the current area (closing any file already occupying
that area). The <cAlias> parameter specifies the alias name for the new opened
database
Examples
function main()
local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
{ "NUMERIC", "N", 8, 0 }, ;
{ "DOUBLE", "N", 8, 2 }, ;
{ "DATE", "D", 8, 0 }, ;
{ "LOGICAL", "L", 1, 0 }, ;
{ "MEMO1", "M", 10, 0 }, ;
{ "MEMO2", "M", 10, 0 } }
REQUEST DBFCDX
dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
RETURN NIL
Files
Library is rdd Header is Dbstruct.ch
Look at XailerxHarbourdocchmxHarbour.chm
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>Dear Ingo,
>
>Will this code work when I use different RDD ? such as CDX & ADS ?
>
>David
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> TDbfDataSet():Create() is a constructor of the DataSet object not the
creator
>> of the dbf-file.
>> Use
>>
>> DBCREATE(cFile,aFieldList)
>>
>> to build a new database.
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> I tried to create a physical DBF file with the following but failed !
>>> Any comment ?
>>>
>>> METHOD Button1Click( oSender ) CLASS Tform1
>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>> {"KEYFLD2", "D", 8, 0}, ;
>>> {"FLD3", "C", 20, 0} }
>>> Local cFile := "MyClient.DBF", lDbf
>>>
>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>> :afields := afieldlist
>>> END WITH
>>>
>>> RETURN Nil
>>>
>>>
>>> Thanks.
>>> David
>>>
>>>
>>

Create Physical DBF files

Publicado: Jue Oct 12, 2006 12:49 pm
por Ingo Junge-Herrmann
David,
here is the documentation of DBCREATE()
DBCREATE()
Creates an empty database from a array.
Syntax
DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
[<cAlias>]) --> NIL
Arguments
<cDatabase> Name of database to be create
<aStruct> Name of a multidimensional array that contains the a database structure
<cDriver> Name of the RDD
<lOpenNew> 3-way toggle to Open the file in New or Current workarea:
NIL The file is not opened.
True It is opened in a New area.
False It is opened in the current area.
<cAlias> Name of database Alias
Returns
DBCREATE() always returns NIL.
Description
This function creates the database file specified as <cDatabase> from the
multidimensional array <aStruct>.If no file extension is use with <cDatabase>
the .DBF extension is assumed. The array specified in <aStruct> must follow
a few guidelines when being built prior to a call to DBCREATE():
- All subscripts values in the second dimension must be set to proper values
- The fourth subscript value in the second dimension - which contains the
decimal value-must he specified. even 1kw nonnumeric fields.
- The second subscript value in the second dimension-which contains the field
data type-must contain a proper value: C, D, L, M or N It is possible to
use additional letters (or clarity (e.g., 'Numeric' for 'N'): however, the
first letter of this array element must be a proper value.
The DBCREATE( ) function does not use the decimal field to calculate the
length of a character held longer than 256. Values up to the maximum length
of a character field (which is 65,519 bytes) are stored directly in the database
in the length attribute if that database was created via this function. However,
a file containing fields longer than 256 bytes is not compatible with any
interpreter.
The <cDriver> parameter specifies the name of the Replaceable Da- tabase
Driver to use to create the database. If it is not specified, then the Replaceable
Database Driver in the current work area is tised. The <lOpenNew> parameter
specifies if the already created database is to be opened, and where. If
NIL, the file is not opened. If True, it is opened in a New area, and if
False it is opened in the current area (closing any file already occupying
that area). The <cAlias> parameter specifies the alias name for the new opened
database
Examples
function main()
local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
{ "NUMERIC", "N", 8, 0 }, ;
{ "DOUBLE", "N", 8, 2 }, ;
{ "DATE", "D", 8, 0 }, ;
{ "LOGICAL", "L", 1, 0 }, ;
{ "MEMO1", "M", 10, 0 }, ;
{ "MEMO2", "M", 10, 0 } }
REQUEST DBFCDX
dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
RETURN NIL
Files
Library is rdd Header is Dbstruct.ch
Look at XailerxHarbourdocchmxHarbour.chm
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>Dear Ingo,
>
>Will this code work when I use different RDD ? such as CDX & ADS ?
>
>David
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> TDbfDataSet():Create() is a constructor of the DataSet object not the
creator
>> of the dbf-file.
>> Use
>>
>> DBCREATE(cFile,aFieldList)
>>
>> to build a new database.
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> I tried to create a physical DBF file with the following but failed !
>>> Any comment ?
>>>
>>> METHOD Button1Click( oSender ) CLASS Tform1
>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>> {"KEYFLD2", "D", 8, 0}, ;
>>> {"FLD3", "C", 20, 0} }
>>> Local cFile := "MyClient.DBF", lDbf
>>>
>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>> :afields := afieldlist
>>> END WITH
>>>
>>> RETURN Nil
>>>
>>>
>>> Thanks.
>>> David
>>>
>>>
>>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 1:01 am
por david fung
Thank you Ingo.
BTW, I don't seems to have the xHarbout.chm mentioned in
XailerxHarbourdocchmxHarbour.chm
Any idea where I could get it ? I don't even have the doc folder.
Thanks.
David
Ingo Junge-Herrmann wrote:
> David,
>
> here is the documentation of DBCREATE()
>
> DBCREATE()
> Creates an empty database from a array.
>
> Syntax
>
>
> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
> [<cAlias>]) --> NIL
>
> Arguments
>
>
> <cDatabase> Name of database to be create
>
>
> <aStruct> Name of a multidimensional array that contains the a database structure
>
>
>
> <cDriver> Name of the RDD
>
>
> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>
> NIL The file is not opened.
> True It is opened in a New area.
> False It is opened in the current area.
>
> <cAlias> Name of database Alias
>
> Returns
>
>
> DBCREATE() always returns NIL.
>
>
> Description
>
>
> This function creates the database file specified as <cDatabase> from the
> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
> the .DBF extension is assumed. The array specified in <aStruct> must follow
> a few guidelines when being built prior to a call to DBCREATE():
>
>
> - All subscripts values in the second dimension must be set to proper values
>
>
>
> - The fourth subscript value in the second dimension - which contains the
> decimal value-must he specified. even 1kw nonnumeric fields.
>
>
> - The second subscript value in the second dimension-which contains the field
> data type-must contain a proper value: C, D, L, M or N It is possible to
> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however, the
> first letter of this array element must be a proper value.
>
>
> The DBCREATE( ) function does not use the decimal field to calculate the
> length of a character held longer than 256. Values up to the maximum length
> of a character field (which is 65,519 bytes) are stored directly in the database
> in the length attribute if that database was created via this function. However,
> a file containing fields longer than 256 bytes is not compatible with any
> interpreter.
>
>
> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
> Driver to use to create the database. If it is not specified, then the Replaceable
> Database Driver in the current work area is tised. The <lOpenNew> parameter
> specifies if the already created database is to be opened, and where. If
> NIL, the file is not opened. If True, it is opened in a New area, and if
> False it is opened in the current area (closing any file already occupying
> that area). The <cAlias> parameter specifies the alias name for the new opened
> database
> Examples
> function main()
>
> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
> { "NUMERIC", "N", 8, 0 }, ;
> { "DOUBLE", "N", 8, 2 }, ;
> { "DATE", "D", 8, 0 }, ;
> { "LOGICAL", "L", 1, 0 }, ;
> { "MEMO1", "M", 10, 0 }, ;
> { "MEMO2", "M", 10, 0 } }
>
> REQUEST DBFCDX
>
> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>
> RETURN NIL
>
> Files
>
>
> Library is rdd Header is Dbstruct.ch
>
>
> Look at XailerxHarbourdocchmxHarbour.chm
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> Dear Ingo,
>>
>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>
>> David
>>
>>
>> Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
> creator
>>> of the dbf-file.
>>> Use
>>>
>>> DBCREATE(cFile,aFieldList)
>>>
>>> to build a new database.
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> I tried to create a physical DBF file with the following but failed !
>>>> Any comment ?
>>>>
>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>> {"FLD3", "C", 20, 0} }
>>>> Local cFile := "MyClient.DBF", lDbf
>>>>
>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>> :afields := afieldlist
>>>> END WITH
>>>>
>>>> RETURN Nil
>>>>
>>>>
>>>> Thanks.
>>>> David
>>>>
>>>>
>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 1:01 am
por david fung
Thank you Ingo.
BTW, I don't seems to have the xHarbout.chm mentioned in
XailerxHarbourdocchmxHarbour.chm
Any idea where I could get it ? I don't even have the doc folder.
Thanks.
David
Ingo Junge-Herrmann wrote:
> David,
>
> here is the documentation of DBCREATE()
>
> DBCREATE()
> Creates an empty database from a array.
>
> Syntax
>
>
> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
> [<cAlias>]) --> NIL
>
> Arguments
>
>
> <cDatabase> Name of database to be create
>
>
> <aStruct> Name of a multidimensional array that contains the a database structure
>
>
>
> <cDriver> Name of the RDD
>
>
> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>
> NIL The file is not opened.
> True It is opened in a New area.
> False It is opened in the current area.
>
> <cAlias> Name of database Alias
>
> Returns
>
>
> DBCREATE() always returns NIL.
>
>
> Description
>
>
> This function creates the database file specified as <cDatabase> from the
> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
> the .DBF extension is assumed. The array specified in <aStruct> must follow
> a few guidelines when being built prior to a call to DBCREATE():
>
>
> - All subscripts values in the second dimension must be set to proper values
>
>
>
> - The fourth subscript value in the second dimension - which contains the
> decimal value-must he specified. even 1kw nonnumeric fields.
>
>
> - The second subscript value in the second dimension-which contains the field
> data type-must contain a proper value: C, D, L, M or N It is possible to
> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however, the
> first letter of this array element must be a proper value.
>
>
> The DBCREATE( ) function does not use the decimal field to calculate the
> length of a character held longer than 256. Values up to the maximum length
> of a character field (which is 65,519 bytes) are stored directly in the database
> in the length attribute if that database was created via this function. However,
> a file containing fields longer than 256 bytes is not compatible with any
> interpreter.
>
>
> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
> Driver to use to create the database. If it is not specified, then the Replaceable
> Database Driver in the current work area is tised. The <lOpenNew> parameter
> specifies if the already created database is to be opened, and where. If
> NIL, the file is not opened. If True, it is opened in a New area, and if
> False it is opened in the current area (closing any file already occupying
> that area). The <cAlias> parameter specifies the alias name for the new opened
> database
> Examples
> function main()
>
> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
> { "NUMERIC", "N", 8, 0 }, ;
> { "DOUBLE", "N", 8, 2 }, ;
> { "DATE", "D", 8, 0 }, ;
> { "LOGICAL", "L", 1, 0 }, ;
> { "MEMO1", "M", 10, 0 }, ;
> { "MEMO2", "M", 10, 0 } }
>
> REQUEST DBFCDX
>
> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>
> RETURN NIL
>
> Files
>
>
> Library is rdd Header is Dbstruct.ch
>
>
> Look at XailerxHarbourdocchmxHarbour.chm
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> Dear Ingo,
>>
>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>
>> David
>>
>>
>> Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
> creator
>>> of the dbf-file.
>>> Use
>>>
>>> DBCREATE(cFile,aFieldList)
>>>
>>> to build a new database.
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> I tried to create a physical DBF file with the following but failed !
>>>> Any comment ?
>>>>
>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>> {"FLD3", "C", 20, 0} }
>>>> Local cFile := "MyClient.DBF", lDbf
>>>>
>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>> :afields := afieldlist
>>>> END WITH
>>>>
>>>> RETURN Nil
>>>>
>>>>
>>>> Thanks.
>>>> David
>>>>
>>>>
>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 7:09 am
por Ingo Junge-Herrmann
David,
I have downloaded and installed xHarbour last year from the Xailer's site:
http://www.xailer.com/files/xharbour.exe
I don't know if xHarbour.chm is nincluded yet.
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>Thank you Ingo.
>
>BTW, I don't seems to have the xHarbout.chm mentioned in
>
>XailerxHarbourdocchmxHarbour.chm
>
>Any idea where I could get it ? I don't even have the doc folder.
>
>Thanks.
>David
>
>
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> here is the documentation of DBCREATE()
>>
>> DBCREATE()
>> Creates an empty database from a array.
>>
>> Syntax
>>
>>
>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>> [<cAlias>]) --> NIL
>>
>> Arguments
>>
>>
>> <cDatabase> Name of database to be create
>>
>>
>> <aStruct> Name of a multidimensional array that contains the a database
structure
>>
>>
>>
>> <cDriver> Name of the RDD
>>
>>
>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>
>> NIL The file is not opened.
>> True It is opened in a New area.
>> False It is opened in the current area.
>>
>> <cAlias> Name of database Alias
>>
>> Returns
>>
>>
>> DBCREATE() always returns NIL.
>>
>>
>> Description
>>
>>
>> This function creates the database file specified as <cDatabase> from
the
>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>> the .DBF extension is assumed. The array specified in <aStruct> must follow
>> a few guidelines when being built prior to a call to DBCREATE():
>>
>>
>> - All subscripts values in the second dimension must be set to proper
values
>>
>>
>>
>> - The fourth subscript value in the second dimension - which contains
the
>> decimal value-must he specified. even 1kw nonnumeric fields.
>>
>>
>> - The second subscript value in the second dimension-which contains the
field
>> data type-must contain a proper value: C, D, L, M or N It is possible
to
>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
the
>> first letter of this array element must be a proper value.
>>
>>
>> The DBCREATE( ) function does not use the decimal field to calculate the
>> length of a character held longer than 256. Values up to the maximum length
>> of a character field (which is 65,519 bytes) are stored directly in the
database
>> in the length attribute if that database was created via this function.
However,
>> a file containing fields longer than 256 bytes is not compatible with
any
>> interpreter.
>>
>>
>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>> Driver to use to create the database. If it is not specified, then the
Replaceable
>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>> specifies if the already created database is to be opened, and where.
If
>> NIL, the file is not opened. If True, it is opened in a New area, and
if
>> False it is opened in the current area (closing any file already occupying
>> that area). The <cAlias> parameter specifies the alias name for the new
opened
>> database
>> Examples
>> function main()
>>
>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>> { "NUMERIC", "N", 8, 0 }, ;
>> { "DOUBLE", "N", 8, 2 }, ;
>> { "DATE", "D", 8, 0 }, ;
>> { "LOGICAL", "L", 1, 0 }, ;
>> { "MEMO1", "M", 10, 0 }, ;
>> { "MEMO2", "M", 10, 0 } }
>>
>> REQUEST DBFCDX
>>
>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>
>> RETURN NIL
>>
>> Files
>>
>>
>> Library is rdd Header is Dbstruct.ch
>>
>>
>> Look at XailerxHarbourdocchmxHarbour.chm
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> Dear Ingo,
>>>
>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>
>>> David
>>>
>>>
>>> Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
>> creator
>>>> of the dbf-file.
>>>> Use
>>>>
>>>> DBCREATE(cFile,aFieldList)
>>>>
>>>> to build a new database.
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> I tried to create a physical DBF file with the following but failed
!
>>>>> Any comment ?
>>>>>
>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>> {"FLD3", "C", 20, 0} }
>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>
>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>>> :afields := afieldlist
>>>>> END WITH
>>>>>
>>>>> RETURN Nil
>>>>>
>>>>>
>>>>> Thanks.
>>>>> David
>>>>>
>>>>>
>>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 7:09 am
por Ingo Junge-Herrmann
David,
I have downloaded and installed xHarbour last year from the Xailer's site:
http://www.xailer.com/files/xharbour.exe
I don't know if xHarbour.chm is nincluded yet.
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>Thank you Ingo.
>
>BTW, I don't seems to have the xHarbout.chm mentioned in
>
>XailerxHarbourdocchmxHarbour.chm
>
>Any idea where I could get it ? I don't even have the doc folder.
>
>Thanks.
>David
>
>
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> here is the documentation of DBCREATE()
>>
>> DBCREATE()
>> Creates an empty database from a array.
>>
>> Syntax
>>
>>
>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>> [<cAlias>]) --> NIL
>>
>> Arguments
>>
>>
>> <cDatabase> Name of database to be create
>>
>>
>> <aStruct> Name of a multidimensional array that contains the a database
structure
>>
>>
>>
>> <cDriver> Name of the RDD
>>
>>
>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>
>> NIL The file is not opened.
>> True It is opened in a New area.
>> False It is opened in the current area.
>>
>> <cAlias> Name of database Alias
>>
>> Returns
>>
>>
>> DBCREATE() always returns NIL.
>>
>>
>> Description
>>
>>
>> This function creates the database file specified as <cDatabase> from
the
>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>> the .DBF extension is assumed. The array specified in <aStruct> must follow
>> a few guidelines when being built prior to a call to DBCREATE():
>>
>>
>> - All subscripts values in the second dimension must be set to proper
values
>>
>>
>>
>> - The fourth subscript value in the second dimension - which contains
the
>> decimal value-must he specified. even 1kw nonnumeric fields.
>>
>>
>> - The second subscript value in the second dimension-which contains the
field
>> data type-must contain a proper value: C, D, L, M or N It is possible
to
>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
the
>> first letter of this array element must be a proper value.
>>
>>
>> The DBCREATE( ) function does not use the decimal field to calculate the
>> length of a character held longer than 256. Values up to the maximum length
>> of a character field (which is 65,519 bytes) are stored directly in the
database
>> in the length attribute if that database was created via this function.
However,
>> a file containing fields longer than 256 bytes is not compatible with
any
>> interpreter.
>>
>>
>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>> Driver to use to create the database. If it is not specified, then the
Replaceable
>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>> specifies if the already created database is to be opened, and where.
If
>> NIL, the file is not opened. If True, it is opened in a New area, and
if
>> False it is opened in the current area (closing any file already occupying
>> that area). The <cAlias> parameter specifies the alias name for the new
opened
>> database
>> Examples
>> function main()
>>
>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>> { "NUMERIC", "N", 8, 0 }, ;
>> { "DOUBLE", "N", 8, 2 }, ;
>> { "DATE", "D", 8, 0 }, ;
>> { "LOGICAL", "L", 1, 0 }, ;
>> { "MEMO1", "M", 10, 0 }, ;
>> { "MEMO2", "M", 10, 0 } }
>>
>> REQUEST DBFCDX
>>
>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>
>> RETURN NIL
>>
>> Files
>>
>>
>> Library is rdd Header is Dbstruct.ch
>>
>>
>> Look at XailerxHarbourdocchmxHarbour.chm
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> Dear Ingo,
>>>
>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>
>>> David
>>>
>>>
>>> Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
>> creator
>>>> of the dbf-file.
>>>> Use
>>>>
>>>> DBCREATE(cFile,aFieldList)
>>>>
>>>> to build a new database.
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> I tried to create a physical DBF file with the following but failed
!
>>>>> Any comment ?
>>>>>
>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>> {"FLD3", "C", 20, 0} }
>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>
>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>>> :afields := afieldlist
>>>>> END WITH
>>>>>
>>>>> RETURN Nil
>>>>>
>>>>>
>>>>> Thanks.
>>>>> David
>>>>>
>>>>>
>>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 7:31 am
por david fung
I am using the same file
http://www.xailer.com/files/xharbour.exe
Does not include the doc folder.
David
Ingo Junge-Herrmann wrote:
> David,
>
> I have downloaded and installed xHarbour last year from the Xailer's site:
>
> http://www.xailer.com/files/xharbour.exe
>
> I don't know if xHarbour.chm is nincluded yet.
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> Thank you Ingo.
>>
>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>
>> XailerxHarbourdocchmxHarbour.chm
>>
>> Any idea where I could get it ? I don't even have the doc folder.
>>
>> Thanks.
>> David
>>
>>
>>
>>
>> Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> here is the documentation of DBCREATE()
>>>
>>> DBCREATE()
>>> Creates an empty database from a array.
>>>
>>> Syntax
>>>
>>>
>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>> [<cAlias>]) --> NIL
>>>
>>> Arguments
>>>
>>>
>>> <cDatabase> Name of database to be create
>>>
>>>
>>> <aStruct> Name of a multidimensional array that contains the a database
> structure
>>>
>>>
>>> <cDriver> Name of the RDD
>>>
>>>
>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>>
>>> NIL The file is not opened.
>>> True It is opened in a New area.
>>> False It is opened in the current area.
>>>
>>> <cAlias> Name of database Alias
>>>
>>> Returns
>>>
>>>
>>> DBCREATE() always returns NIL.
>>>
>>>
>>> Description
>>>
>>>
>>> This function creates the database file specified as <cDatabase> from
> the
>>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>>> the .DBF extension is assumed. The array specified in <aStruct> must follow
>>> a few guidelines when being built prior to a call to DBCREATE():
>>>
>>>
>>> - All subscripts values in the second dimension must be set to proper
> values
>>>
>>>
>>> - The fourth subscript value in the second dimension - which contains
> the
>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>
>>>
>>> - The second subscript value in the second dimension-which contains the
> field
>>> data type-must contain a proper value: C, D, L, M or N It is possible
> to
>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
> the
>>> first letter of this array element must be a proper value.
>>>
>>>
>>> The DBCREATE( ) function does not use the decimal field to calculate the
>>> length of a character held longer than 256. Values up to the maximum length
>>> of a character field (which is 65,519 bytes) are stored directly in the
> database
>>> in the length attribute if that database was created via this function.
> However,
>>> a file containing fields longer than 256 bytes is not compatible with
> any
>>> interpreter.
>>>
>>>
>>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>>> Driver to use to create the database. If it is not specified, then the
> Replaceable
>>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>>> specifies if the already created database is to be opened, and where.
> If
>>> NIL, the file is not opened. If True, it is opened in a New area, and
> if
>>> False it is opened in the current area (closing any file already occupying
>>> that area). The <cAlias> parameter specifies the alias name for the new
> opened
>>> database
>>> Examples
>>> function main()
>>>
>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>> { "NUMERIC", "N", 8, 0 }, ;
>>> { "DOUBLE", "N", 8, 2 }, ;
>>> { "DATE", "D", 8, 0 }, ;
>>> { "LOGICAL", "L", 1, 0 }, ;
>>> { "MEMO1", "M", 10, 0 }, ;
>>> { "MEMO2", "M", 10, 0 } }
>>>
>>> REQUEST DBFCDX
>>>
>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>
>>> RETURN NIL
>>>
>>> Files
>>>
>>>
>>> Library is rdd Header is Dbstruct.ch
>>>
>>>
>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> Dear Ingo,
>>>>
>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>
>>>> David
>>>>
>>>>
>>>> Ingo Junge-Herrmann wrote:
>>>>> David,
>>>>>
>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
>>> creator
>>>>> of the dbf-file.
>>>>> Use
>>>>>
>>>>> DBCREATE(cFile,aFieldList)
>>>>>
>>>>> to build a new database.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ingo
>>>>>
>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>> I tried to create a physical DBF file with the following but failed
> !
>>>>>> Any comment ?
>>>>>>
>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>> {"FLD3", "C", 20, 0} }
>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>
>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>>>> :afields := afieldlist
>>>>>> END WITH
>>>>>>
>>>>>> RETURN Nil
>>>>>>
>>>>>>
>>>>>> Thanks.
>>>>>> David
>>>>>>
>>>>>>
>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 7:31 am
por david fung
I am using the same file
http://www.xailer.com/files/xharbour.exe
Does not include the doc folder.
David
Ingo Junge-Herrmann wrote:
> David,
>
> I have downloaded and installed xHarbour last year from the Xailer's site:
>
> http://www.xailer.com/files/xharbour.exe
>
> I don't know if xHarbour.chm is nincluded yet.
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>> Thank you Ingo.
>>
>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>
>> XailerxHarbourdocchmxHarbour.chm
>>
>> Any idea where I could get it ? I don't even have the doc folder.
>>
>> Thanks.
>> David
>>
>>
>>
>>
>> Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> here is the documentation of DBCREATE()
>>>
>>> DBCREATE()
>>> Creates an empty database from a array.
>>>
>>> Syntax
>>>
>>>
>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>> [<cAlias>]) --> NIL
>>>
>>> Arguments
>>>
>>>
>>> <cDatabase> Name of database to be create
>>>
>>>
>>> <aStruct> Name of a multidimensional array that contains the a database
> structure
>>>
>>>
>>> <cDriver> Name of the RDD
>>>
>>>
>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>>
>>> NIL The file is not opened.
>>> True It is opened in a New area.
>>> False It is opened in the current area.
>>>
>>> <cAlias> Name of database Alias
>>>
>>> Returns
>>>
>>>
>>> DBCREATE() always returns NIL.
>>>
>>>
>>> Description
>>>
>>>
>>> This function creates the database file specified as <cDatabase> from
> the
>>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>>> the .DBF extension is assumed. The array specified in <aStruct> must follow
>>> a few guidelines when being built prior to a call to DBCREATE():
>>>
>>>
>>> - All subscripts values in the second dimension must be set to proper
> values
>>>
>>>
>>> - The fourth subscript value in the second dimension - which contains
> the
>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>
>>>
>>> - The second subscript value in the second dimension-which contains the
> field
>>> data type-must contain a proper value: C, D, L, M or N It is possible
> to
>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
> the
>>> first letter of this array element must be a proper value.
>>>
>>>
>>> The DBCREATE( ) function does not use the decimal field to calculate the
>>> length of a character held longer than 256. Values up to the maximum length
>>> of a character field (which is 65,519 bytes) are stored directly in the
> database
>>> in the length attribute if that database was created via this function.
> However,
>>> a file containing fields longer than 256 bytes is not compatible with
> any
>>> interpreter.
>>>
>>>
>>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>>> Driver to use to create the database. If it is not specified, then the
> Replaceable
>>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>>> specifies if the already created database is to be opened, and where.
> If
>>> NIL, the file is not opened. If True, it is opened in a New area, and
> if
>>> False it is opened in the current area (closing any file already occupying
>>> that area). The <cAlias> parameter specifies the alias name for the new
> opened
>>> database
>>> Examples
>>> function main()
>>>
>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>> { "NUMERIC", "N", 8, 0 }, ;
>>> { "DOUBLE", "N", 8, 2 }, ;
>>> { "DATE", "D", 8, 0 }, ;
>>> { "LOGICAL", "L", 1, 0 }, ;
>>> { "MEMO1", "M", 10, 0 }, ;
>>> { "MEMO2", "M", 10, 0 } }
>>>
>>> REQUEST DBFCDX
>>>
>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>
>>> RETURN NIL
>>>
>>> Files
>>>
>>>
>>> Library is rdd Header is Dbstruct.ch
>>>
>>>
>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> Dear Ingo,
>>>>
>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>
>>>> David
>>>>
>>>>
>>>> Ingo Junge-Herrmann wrote:
>>>>> David,
>>>>>
>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not the
>>> creator
>>>>> of the dbf-file.
>>>>> Use
>>>>>
>>>>> DBCREATE(cFile,aFieldList)
>>>>>
>>>>> to build a new database.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ingo
>>>>>
>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>> I tried to create a physical DBF file with the following but failed
> !
>>>>>> Any comment ?
>>>>>>
>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>> {"FLD3", "C", 20, 0} }
>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>
>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource, cFile)
>>>>>> :afields := afieldlist
>>>>>> END WITH
>>>>>>
>>>>>> RETURN Nil
>>>>>>
>>>>>>
>>>>>> Thanks.
>>>>>> David
>>>>>>
>>>>>>
>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 9:29 am
por Ingo Junge-Herrmann
David,
maybe the Xailer's people can help you to get this documentation.
A good online documentation you can find on the xHarbour.com site:
http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>I am using the same file
>
>http://www.xailer.com/files/xharbour.exe
>
>Does not include the doc folder.
>
>David
>
>
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> I have downloaded and installed xHarbour last year from the Xailer's site:
>>
>> http://www.xailer.com/files/xharbour.exe
>>
>> I don't know if xHarbour.chm is nincluded yet.
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> Thank you Ingo.
>>>
>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>
>>> XailerxHarbourdocchmxHarbour.chm
>>>
>>> Any idea where I could get it ? I don't even have the doc folder.
>>>
>>> Thanks.
>>> David
>>>
>>>
>>>
>>>
>>> Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> here is the documentation of DBCREATE()
>>>>
>>>> DBCREATE()
>>>> Creates an empty database from a array.
>>>>
>>>> Syntax
>>>>
>>>>
>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>> [<cAlias>]) --> NIL
>>>>
>>>> Arguments
>>>>
>>>>
>>>> <cDatabase> Name of database to be create
>>>>
>>>>
>>>> <aStruct> Name of a multidimensional array that contains the a database
>> structure
>>>>
>>>>
>>>> <cDriver> Name of the RDD
>>>>
>>>>
>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>>>
>>>> NIL The file is not opened.
>>>> True It is opened in a New area.
>>>> False It is opened in the current area.
>>>>
>>>> <cAlias> Name of database Alias
>>>>
>>>> Returns
>>>>
>>>>
>>>> DBCREATE() always returns NIL.
>>>>
>>>>
>>>> Description
>>>>
>>>>
>>>> This function creates the database file specified as <cDatabase> from
>> the
>>>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>>>> the .DBF extension is assumed. The array specified in <aStruct> must
follow
>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>
>>>>
>>>> - All subscripts values in the second dimension must be set to proper
>> values
>>>>
>>>>
>>>> - The fourth subscript value in the second dimension - which contains
>> the
>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>
>>>>
>>>> - The second subscript value in the second dimension-which contains
the
>> field
>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>> to
>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>> the
>>>> first letter of this array element must be a proper value.
>>>>
>>>>
>>>> The DBCREATE( ) function does not use the decimal field to calculate
the
>>>> length of a character held longer than 256. Values up to the maximum
length
>>>> of a character field (which is 65,519 bytes) are stored directly in
the
>> database
>>>> in the length attribute if that database was created via this function.
>> However,
>>>> a file containing fields longer than 256 bytes is not compatible with
>> any
>>>> interpreter.
>>>>
>>>>
>>>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>>>> Driver to use to create the database. If it is not specified, then the
>> Replaceable
>>>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>>>> specifies if the already created database is to be opened, and where.
>> If
>>>> NIL, the file is not opened. If True, it is opened in a New area, and
>> if
>>>> False it is opened in the current area (closing any file already occupying
>>>> that area). The <cAlias> parameter specifies the alias name for the
new
>> opened
>>>> database
>>>> Examples
>>>> function main()
>>>>
>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>> { "DATE", "D", 8, 0 }, ;
>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>> { "MEMO1", "M", 10, 0 }, ;
>>>> { "MEMO2", "M", 10, 0 } }
>>>>
>>>> REQUEST DBFCDX
>>>>
>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>
>>>> RETURN NIL
>>>>
>>>> Files
>>>>
>>>>
>>>> Library is rdd Header is Dbstruct.ch
>>>>
>>>>
>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> Dear Ingo,
>>>>>
>>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> Ingo Junge-Herrmann wrote:
>>>>>> David,
>>>>>>
>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
the
>>>> creator
>>>>>> of the dbf-file.
>>>>>> Use
>>>>>>
>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>
>>>>>> to build a new database.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ingo
>>>>>>
>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>> I tried to create a physical DBF file with the following but failed
>> !
>>>>>>> Any comment ?
>>>>>>>
>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>
>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
cFile)
>>>>>>> :afields := afieldlist
>>>>>>> END WITH
>>>>>>>
>>>>>>> RETURN Nil
>>>>>>>
>>>>>>>
>>>>>>> Thanks.
>>>>>>> David
>>>>>>>
>>>>>>>
>>

Create Physical DBF files

Publicado: Vie Oct 13, 2006 9:29 am
por Ingo Junge-Herrmann
David,
maybe the Xailer's people can help you to get this documentation.
A good online documentation you can find on the xHarbour.com site:
http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
Regards
Ingo
david fung <davfung@yahoo.com> wrote:
>I am using the same file
>
>http://www.xailer.com/files/xharbour.exe
>
>Does not include the doc folder.
>
>David
>
>
>
>
>Ingo Junge-Herrmann wrote:
>> David,
>>
>> I have downloaded and installed xHarbour last year from the Xailer's site:
>>
>> http://www.xailer.com/files/xharbour.exe
>>
>> I don't know if xHarbour.chm is nincluded yet.
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>> Thank you Ingo.
>>>
>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>
>>> XailerxHarbourdocchmxHarbour.chm
>>>
>>> Any idea where I could get it ? I don't even have the doc folder.
>>>
>>> Thanks.
>>> David
>>>
>>>
>>>
>>>
>>> Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> here is the documentation of DBCREATE()
>>>>
>>>> DBCREATE()
>>>> Creates an empty database from a array.
>>>>
>>>> Syntax
>>>>
>>>>
>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>> [<cAlias>]) --> NIL
>>>>
>>>> Arguments
>>>>
>>>>
>>>> <cDatabase> Name of database to be create
>>>>
>>>>
>>>> <aStruct> Name of a multidimensional array that contains the a database
>> structure
>>>>
>>>>
>>>> <cDriver> Name of the RDD
>>>>
>>>>
>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>>>
>>>> NIL The file is not opened.
>>>> True It is opened in a New area.
>>>> False It is opened in the current area.
>>>>
>>>> <cAlias> Name of database Alias
>>>>
>>>> Returns
>>>>
>>>>
>>>> DBCREATE() always returns NIL.
>>>>
>>>>
>>>> Description
>>>>
>>>>
>>>> This function creates the database file specified as <cDatabase> from
>> the
>>>> multidimensional array <aStruct>.If no file extension is use with <cDatabase>
>>>> the .DBF extension is assumed. The array specified in <aStruct> must
follow
>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>
>>>>
>>>> - All subscripts values in the second dimension must be set to proper
>> values
>>>>
>>>>
>>>> - The fourth subscript value in the second dimension - which contains
>> the
>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>
>>>>
>>>> - The second subscript value in the second dimension-which contains
the
>> field
>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>> to
>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>> the
>>>> first letter of this array element must be a proper value.
>>>>
>>>>
>>>> The DBCREATE( ) function does not use the decimal field to calculate
the
>>>> length of a character held longer than 256. Values up to the maximum
length
>>>> of a character field (which is 65,519 bytes) are stored directly in
the
>> database
>>>> in the length attribute if that database was created via this function.
>> However,
>>>> a file containing fields longer than 256 bytes is not compatible with
>> any
>>>> interpreter.
>>>>
>>>>
>>>> The <cDriver> parameter specifies the name of the Replaceable Da- tabase
>>>> Driver to use to create the database. If it is not specified, then the
>> Replaceable
>>>> Database Driver in the current work area is tised. The <lOpenNew> parameter
>>>> specifies if the already created database is to be opened, and where.
>> If
>>>> NIL, the file is not opened. If True, it is opened in a New area, and
>> if
>>>> False it is opened in the current area (closing any file already occupying
>>>> that area). The <cAlias> parameter specifies the alias name for the
new
>> opened
>>>> database
>>>> Examples
>>>> function main()
>>>>
>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>> { "DATE", "D", 8, 0 }, ;
>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>> { "MEMO1", "M", 10, 0 }, ;
>>>> { "MEMO2", "M", 10, 0 } }
>>>>
>>>> REQUEST DBFCDX
>>>>
>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>
>>>> RETURN NIL
>>>>
>>>> Files
>>>>
>>>>
>>>> Library is rdd Header is Dbstruct.ch
>>>>
>>>>
>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> Dear Ingo,
>>>>>
>>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> Ingo Junge-Herrmann wrote:
>>>>>> David,
>>>>>>
>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
the
>>>> creator
>>>>>> of the dbf-file.
>>>>>> Use
>>>>>>
>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>
>>>>>> to build a new database.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ingo
>>>>>>
>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>> I tried to create a physical DBF file with the following but failed
>> !
>>>>>>> Any comment ?
>>>>>>>
>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>
>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
cFile)
>>>>>>> :afields := afieldlist
>>>>>>> END WITH
>>>>>>>
>>>>>>> RETURN Nil
>>>>>>>
>>>>>>>
>>>>>>> Thanks.
>>>>>>> David
>>>>>>>
>>>>>>>
>>

Create Physical DBF files

Publicado: Sab Oct 14, 2006 9:47 am
por _support_
Ingo,
I suggest you use any Clipper 5.2 documentation. That will cover the 90% of
xHarbour documentation. The 10% rest wich are the extensions to the language
maybe can be found at xharbour.com
Regards,
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:452f4053$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> David,
> maybe the Xailer's people can help you to get this documentation.
>
> A good online documentation you can find on the xHarbour.com site:
> http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>>I am using the same file
>>
>>http://www.xailer.com/files/xharbour.exe
>>
>>Does not include the doc folder.
>>
>>David
>>
>>
>>
>>
>>Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> I have downloaded and installed xHarbour last year from the Xailer's
>>> site:
>>>
>>> http://www.xailer.com/files/xharbour.exe
>>>
>>> I don't know if xHarbour.chm is nincluded yet.
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> Thank you Ingo.
>>>>
>>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>>
>>>> XailerxHarbourdocchmxHarbour.chm
>>>>
>>>> Any idea where I could get it ? I don't even have the doc folder.
>>>>
>>>> Thanks.
>>>> David
>>>>
>>>>
>>>>
>>>>
>>>> Ingo Junge-Herrmann wrote:
>>>>> David,
>>>>>
>>>>> here is the documentation of DBCREATE()
>>>>>
>>>>> DBCREATE()
>>>>> Creates an empty database from a array.
>>>>>
>>>>> Syntax
>>>>>
>>>>>
>>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>>> [<cAlias>]) --> NIL
>>>>>
>>>>> Arguments
>>>>>
>>>>>
>>>>> <cDatabase> Name of database to be create
>>>>>
>>>>>
>>>>> <aStruct> Name of a multidimensional array that contains the a
>>>>> database
>>> structure
>>>>>
>>>>>
>>>>> <cDriver> Name of the RDD
>>>>>
>>>>>
>>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>
>>>>>
>>>>> NIL The file is not opened.
>>>>> True It is opened in a New area.
>>>>> False It is opened in the current area.
>>>>>
>>>>> <cAlias> Name of database Alias
>>>>>
>>>>> Returns
>>>>>
>>>>>
>>>>> DBCREATE() always returns NIL.
>>>>>
>>>>>
>>>>> Description
>>>>>
>>>>>
>>>>> This function creates the database file specified as <cDatabase> from
>>> the
>>>>> multidimensional array <aStruct>.If no file extension is use with
>>>>> <cDatabase>
>>>>> the .DBF extension is assumed. The array specified in <aStruct> must
> follow
>>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>>
>>>>>
>>>>> - All subscripts values in the second dimension must be set to proper
>>> values
>>>>>
>>>>>
>>>>> - The fourth subscript value in the second dimension - which contains
>>> the
>>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>>
>>>>>
>>>>> - The second subscript value in the second dimension-which contains
> the
>>> field
>>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>>> to
>>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>>> the
>>>>> first letter of this array element must be a proper value.
>>>>>
>>>>>
>>>>> The DBCREATE( ) function does not use the decimal field to calculate
> the
>>>>> length of a character held longer than 256. Values up to the maximum
> length
>>>>> of a character field (which is 65,519 bytes) are stored directly in
> the
>>> database
>>>>> in the length attribute if that database was created via this
>>>>> function.
>>> However,
>>>>> a file containing fields longer than 256 bytes is not compatible with
>>> any
>>>>> interpreter.
>>>>>
>>>>>
>>>>> The <cDriver> parameter specifies the name of the Replaceable Da-
>>>>> tabase
>>>>> Driver to use to create the database. If it is not specified, then the
>>> Replaceable
>>>>> Database Driver in the current work area is tised. The <lOpenNew>
>>>>> parameter
>>>>> specifies if the already created database is to be opened, and where.
>>> If
>>>>> NIL, the file is not opened. If True, it is opened in a New area, and
>>> if
>>>>> False it is opened in the current area (closing any file already
>>>>> occupying
>>>>> that area). The <cAlias> parameter specifies the alias name for the
> new
>>> opened
>>>>> database
>>>>> Examples
>>>>> function main()
>>>>>
>>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>>> { "DATE", "D", 8, 0 }, ;
>>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>>> { "MEMO1", "M", 10, 0 }, ;
>>>>> { "MEMO2", "M", 10, 0 } }
>>>>>
>>>>> REQUEST DBFCDX
>>>>>
>>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>>
>>>>> RETURN NIL
>>>>>
>>>>> Files
>>>>>
>>>>>
>>>>> Library is rdd Header is Dbstruct.ch
>>>>>
>>>>>
>>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>>
>>>>> Regards
>>>>>
>>>>> Ingo
>>>>>
>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>> Dear Ingo,
>>>>>>
>>>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>> Ingo Junge-Herrmann wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
> the
>>>>> creator
>>>>>>> of the dbf-file.
>>>>>>> Use
>>>>>>>
>>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>>
>>>>>>> to build a new database.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Ingo
>>>>>>>
>>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>>> I tried to create a physical DBF file with the following but failed
>>> !
>>>>>>>> Any comment ?
>>>>>>>>
>>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>>
>>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
> cFile)
>>>>>>>> :afields := afieldlist
>>>>>>>> END WITH
>>>>>>>>
>>>>>>>> RETURN Nil
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>> David
>>>>>>>>
>>>>>>>>
>>>
>

Create Physical DBF files

Publicado: Sab Oct 14, 2006 9:47 am
por _support_
Ingo,
I suggest you use any Clipper 5.2 documentation. That will cover the 90% of
xHarbour documentation. The 10% rest wich are the extensions to the language
maybe can be found at xharbour.com
Regards,
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:452f4053$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> David,
> maybe the Xailer's people can help you to get this documentation.
>
> A good online documentation you can find on the xHarbour.com site:
> http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
>
> Regards
>
> Ingo
>
> david fung <davfung@yahoo.com> wrote:
>>I am using the same file
>>
>>http://www.xailer.com/files/xharbour.exe
>>
>>Does not include the doc folder.
>>
>>David
>>
>>
>>
>>
>>Ingo Junge-Herrmann wrote:
>>> David,
>>>
>>> I have downloaded and installed xHarbour last year from the Xailer's
>>> site:
>>>
>>> http://www.xailer.com/files/xharbour.exe
>>>
>>> I don't know if xHarbour.chm is nincluded yet.
>>>
>>> Regards
>>>
>>> Ingo
>>>
>>> david fung <davfung@yahoo.com> wrote:
>>>> Thank you Ingo.
>>>>
>>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>>
>>>> XailerxHarbourdocchmxHarbour.chm
>>>>
>>>> Any idea where I could get it ? I don't even have the doc folder.
>>>>
>>>> Thanks.
>>>> David
>>>>
>>>>
>>>>
>>>>
>>>> Ingo Junge-Herrmann wrote:
>>>>> David,
>>>>>
>>>>> here is the documentation of DBCREATE()
>>>>>
>>>>> DBCREATE()
>>>>> Creates an empty database from a array.
>>>>>
>>>>> Syntax
>>>>>
>>>>>
>>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>>> [<cAlias>]) --> NIL
>>>>>
>>>>> Arguments
>>>>>
>>>>>
>>>>> <cDatabase> Name of database to be create
>>>>>
>>>>>
>>>>> <aStruct> Name of a multidimensional array that contains the a
>>>>> database
>>> structure
>>>>>
>>>>>
>>>>> <cDriver> Name of the RDD
>>>>>
>>>>>
>>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>
>>>>>
>>>>> NIL The file is not opened.
>>>>> True It is opened in a New area.
>>>>> False It is opened in the current area.
>>>>>
>>>>> <cAlias> Name of database Alias
>>>>>
>>>>> Returns
>>>>>
>>>>>
>>>>> DBCREATE() always returns NIL.
>>>>>
>>>>>
>>>>> Description
>>>>>
>>>>>
>>>>> This function creates the database file specified as <cDatabase> from
>>> the
>>>>> multidimensional array <aStruct>.If no file extension is use with
>>>>> <cDatabase>
>>>>> the .DBF extension is assumed. The array specified in <aStruct> must
> follow
>>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>>
>>>>>
>>>>> - All subscripts values in the second dimension must be set to proper
>>> values
>>>>>
>>>>>
>>>>> - The fourth subscript value in the second dimension - which contains
>>> the
>>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>>
>>>>>
>>>>> - The second subscript value in the second dimension-which contains
> the
>>> field
>>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>>> to
>>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>>> the
>>>>> first letter of this array element must be a proper value.
>>>>>
>>>>>
>>>>> The DBCREATE( ) function does not use the decimal field to calculate
> the
>>>>> length of a character held longer than 256. Values up to the maximum
> length
>>>>> of a character field (which is 65,519 bytes) are stored directly in
> the
>>> database
>>>>> in the length attribute if that database was created via this
>>>>> function.
>>> However,
>>>>> a file containing fields longer than 256 bytes is not compatible with
>>> any
>>>>> interpreter.
>>>>>
>>>>>
>>>>> The <cDriver> parameter specifies the name of the Replaceable Da-
>>>>> tabase
>>>>> Driver to use to create the database. If it is not specified, then the
>>> Replaceable
>>>>> Database Driver in the current work area is tised. The <lOpenNew>
>>>>> parameter
>>>>> specifies if the already created database is to be opened, and where.
>>> If
>>>>> NIL, the file is not opened. If True, it is opened in a New area, and
>>> if
>>>>> False it is opened in the current area (closing any file already
>>>>> occupying
>>>>> that area). The <cAlias> parameter specifies the alias name for the
> new
>>> opened
>>>>> database
>>>>> Examples
>>>>> function main()
>>>>>
>>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>>> { "DATE", "D", 8, 0 }, ;
>>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>>> { "MEMO1", "M", 10, 0 }, ;
>>>>> { "MEMO2", "M", 10, 0 } }
>>>>>
>>>>> REQUEST DBFCDX
>>>>>
>>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>>
>>>>> RETURN NIL
>>>>>
>>>>> Files
>>>>>
>>>>>
>>>>> Library is rdd Header is Dbstruct.ch
>>>>>
>>>>>
>>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>>
>>>>> Regards
>>>>>
>>>>> Ingo
>>>>>
>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>> Dear Ingo,
>>>>>>
>>>>>> Will this code work when I use different RDD ? such as CDX & ADS ?
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>> Ingo Junge-Herrmann wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
> the
>>>>> creator
>>>>>>> of the dbf-file.
>>>>>>> Use
>>>>>>>
>>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>>
>>>>>>> to build a new database.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Ingo
>>>>>>>
>>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>>> I tried to create a physical DBF file with the following but failed
>>> !
>>>>>>>> Any comment ?
>>>>>>>>
>>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>>
>>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
> cFile)
>>>>>>>> :afields := afieldlist
>>>>>>>> END WITH
>>>>>>>>
>>>>>>>> RETURN Nil
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>> David
>>>>>>>>
>>>>>>>>
>>>
>

Create Physical DBF files

Publicado: Sab Oct 14, 2006 3:42 pm
por Ingo Junge-Herrmann
Ignacio,
sorry you mistook me with David Fung. He was asking for help. I think he
isn't coming from Clipper but from FoxPro.
I'm coming from Clipper and I'm using the Clipper 5.2 documentation.
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote:
>Ingo,
>
>I suggest you use any Clipper 5.2 documentation. That will cover the 90%
of
>xHarbour documentation. The 10% rest wich are the extensions to the language
>maybe can be found at xharbour.com
>
>Regards,
>
>
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:452f4053$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> David,
>> maybe the Xailer's people can help you to get this documentation.
>>
>> A good online documentation you can find on the xHarbour.com site:
>> http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>>I am using the same file
>>>
>>>http://www.xailer.com/files/xharbour.exe
>>>
>>>Does not include the doc folder.
>>>
>>>David
>>>
>>>
>>>
>>>
>>>Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> I have downloaded and installed xHarbour last year from the Xailer's
>>>> site:
>>>>
>>>> http://www.xailer.com/files/xharbour.exe
>>>>
>>>> I don't know if xHarbour.chm is nincluded yet.
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> Thank you Ingo.
>>>>>
>>>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>>>
>>>>> XailerxHarbourdocchmxHarbour.chm
>>>>>
>>>>> Any idea where I could get it ? I don't even have the doc folder.
>>>>>
>>>>> Thanks.
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ingo Junge-Herrmann wrote:
>>>>>> David,
>>>>>>
>>>>>> here is the documentation of DBCREATE()
>>>>>>
>>>>>> DBCREATE()
>>>>>> Creates an empty database from a array.
>>>>>>
>>>>>> Syntax
>>>>>>
>>>>>>
>>>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>>>> [<cAlias>]) --> NIL
>>>>>>
>>>>>> Arguments
>>>>>>
>>>>>>
>>>>>> <cDatabase> Name of database to be create
>>>>>>
>>>>>>
>>>>>> <aStruct> Name of a multidimensional array that contains the a
>>>>>> database
>>>> structure
>>>>>>
>>>>>>
>>>>>> <cDriver> Name of the RDD
>>>>>>
>>>>>>
>>>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>
>>>>>>
>>>>>> NIL The file is not opened.
>>>>>> True It is opened in a New area.
>>>>>> False It is opened in the current area.
>>>>>>
>>>>>> <cAlias> Name of database Alias
>>>>>>
>>>>>> Returns
>>>>>>
>>>>>>
>>>>>> DBCREATE() always returns NIL.
>>>>>>
>>>>>>
>>>>>> Description
>>>>>>
>>>>>>
>>>>>> This function creates the database file specified as <cDatabase> from
>>>> the
>>>>>> multidimensional array <aStruct>.If no file extension is use with
>>>>>> <cDatabase>
>>>>>> the .DBF extension is assumed. The array specified in <aStruct> must
>> follow
>>>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>>>
>>>>>>
>>>>>> - All subscripts values in the second dimension must be set to proper
>>>> values
>>>>>>
>>>>>>
>>>>>> - The fourth subscript value in the second dimension - which contains
>>>> the
>>>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>>>
>>>>>>
>>>>>> - The second subscript value in the second dimension-which contains
>> the
>>>> field
>>>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>>>> to
>>>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>>>> the
>>>>>> first letter of this array element must be a proper value.
>>>>>>
>>>>>>
>>>>>> The DBCREATE( ) function does not use the decimal field to calculate
>> the
>>>>>> length of a character held longer than 256. Values up to the maximum
>> length
>>>>>> of a character field (which is 65,519 bytes) are stored directly in
>> the
>>>> database
>>>>>> in the length attribute if that database was created via this
>>>>>> function.
>>>> However,
>>>>>> a file containing fields longer than 256 bytes is not compatible with
>>>> any
>>>>>> interpreter.
>>>>>>
>>>>>>
>>>>>> The <cDriver> parameter specifies the name of the Replaceable Da-
>>>>>> tabase
>>>>>> Driver to use to create the database. If it is not specified, then
the
>>>> Replaceable
>>>>>> Database Driver in the current work area is tised. The <lOpenNew>
>>>>>> parameter
>>>>>> specifies if the already created database is to be opened, and where.
>>>> If
>>>>>> NIL, the file is not opened. If True, it is opened in a New area,
and
>>>> if
>>>>>> False it is opened in the current area (closing any file already
>>>>>> occupying
>>>>>> that area). The <cAlias> parameter specifies the alias name for the
>> new
>>>> opened
>>>>>> database
>>>>>> Examples
>>>>>> function main()
>>>>>>
>>>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>>>> { "DATE", "D", 8, 0 }, ;
>>>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>>>> { "MEMO1", "M", 10, 0 }, ;
>>>>>> { "MEMO2", "M", 10, 0 } }
>>>>>>
>>>>>> REQUEST DBFCDX
>>>>>>
>>>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>>>
>>>>>> RETURN NIL
>>>>>>
>>>>>> Files
>>>>>>
>>>>>>
>>>>>> Library is rdd Header is Dbstruct.ch
>>>>>>
>>>>>>
>>>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ingo
>>>>>>
>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>> Dear Ingo,
>>>>>>>
>>>>>>> Will this code work when I use different RDD ? such as CDX & ADS
?
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>> Ingo Junge-Herrmann wrote:
>>>>>>>> David,
>>>>>>>>
>>>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
>> the
>>>>>> creator
>>>>>>>> of the dbf-file.
>>>>>>>> Use
>>>>>>>>
>>>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>>>
>>>>>>>> to build a new database.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Ingo
>>>>>>>>
>>>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>>>> I tried to create a physical DBF file with the following but failed
>>>> !
>>>>>>>>> Any comment ?
>>>>>>>>>
>>>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>>>
>>>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
>> cFile)
>>>>>>>>> :afields := afieldlist
>>>>>>>>> END WITH
>>>>>>>>>
>>>>>>>>> RETURN Nil
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>
>>>>
>>
>
>

Create Physical DBF files

Publicado: Sab Oct 14, 2006 3:42 pm
por Ingo Junge-Herrmann
Ignacio,
sorry you mistook me with David Fung. He was asking for help. I think he
isn't coming from Clipper but from FoxPro.
I'm coming from Clipper and I'm using the Clipper 5.2 documentation.
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <_support_@xailer.com> wrote:
>Ingo,
>
>I suggest you use any Clipper 5.2 documentation. That will cover the 90%
of
>xHarbour documentation. The 10% rest wich are the extensions to the language
>maybe can be found at xharbour.com
>
>Regards,
>
>
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:452f4053$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> David,
>> maybe the Xailer's people can help you to get this documentation.
>>
>> A good online documentation you can find on the xHarbour.com site:
>> http://www.xharbour.com/xhdn/index.asp? ... 19&show_su b=1
>>
>> Regards
>>
>> Ingo
>>
>> david fung <davfung@yahoo.com> wrote:
>>>I am using the same file
>>>
>>>http://www.xailer.com/files/xharbour.exe
>>>
>>>Does not include the doc folder.
>>>
>>>David
>>>
>>>
>>>
>>>
>>>Ingo Junge-Herrmann wrote:
>>>> David,
>>>>
>>>> I have downloaded and installed xHarbour last year from the Xailer's
>>>> site:
>>>>
>>>> http://www.xailer.com/files/xharbour.exe
>>>>
>>>> I don't know if xHarbour.chm is nincluded yet.
>>>>
>>>> Regards
>>>>
>>>> Ingo
>>>>
>>>> david fung <davfung@yahoo.com> wrote:
>>>>> Thank you Ingo.
>>>>>
>>>>> BTW, I don't seems to have the xHarbout.chm mentioned in
>>>>>
>>>>> XailerxHarbourdocchmxHarbour.chm
>>>>>
>>>>> Any idea where I could get it ? I don't even have the doc folder.
>>>>>
>>>>> Thanks.
>>>>> David
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ingo Junge-Herrmann wrote:
>>>>>> David,
>>>>>>
>>>>>> here is the documentation of DBCREATE()
>>>>>>
>>>>>> DBCREATE()
>>>>>> Creates an empty database from a array.
>>>>>>
>>>>>> Syntax
>>>>>>
>>>>>>
>>>>>> DBCREATE(<cDatabase>, <aStruct>,[<cDriver>],[<lOpen>],
>>>>>> [<cAlias>]) --> NIL
>>>>>>
>>>>>> Arguments
>>>>>>
>>>>>>
>>>>>> <cDatabase> Name of database to be create
>>>>>>
>>>>>>
>>>>>> <aStruct> Name of a multidimensional array that contains the a
>>>>>> database
>>>> structure
>>>>>>
>>>>>>
>>>>>> <cDriver> Name of the RDD
>>>>>>
>>>>>>
>>>>>> <lOpenNew> 3-way toggle to Open the file in New or Current workarea:
>>
>>>>>>
>>>>>> NIL The file is not opened.
>>>>>> True It is opened in a New area.
>>>>>> False It is opened in the current area.
>>>>>>
>>>>>> <cAlias> Name of database Alias
>>>>>>
>>>>>> Returns
>>>>>>
>>>>>>
>>>>>> DBCREATE() always returns NIL.
>>>>>>
>>>>>>
>>>>>> Description
>>>>>>
>>>>>>
>>>>>> This function creates the database file specified as <cDatabase> from
>>>> the
>>>>>> multidimensional array <aStruct>.If no file extension is use with
>>>>>> <cDatabase>
>>>>>> the .DBF extension is assumed. The array specified in <aStruct> must
>> follow
>>>>>> a few guidelines when being built prior to a call to DBCREATE():
>>>>>>
>>>>>>
>>>>>> - All subscripts values in the second dimension must be set to proper
>>>> values
>>>>>>
>>>>>>
>>>>>> - The fourth subscript value in the second dimension - which contains
>>>> the
>>>>>> decimal value-must he specified. even 1kw nonnumeric fields.
>>>>>>
>>>>>>
>>>>>> - The second subscript value in the second dimension-which contains
>> the
>>>> field
>>>>>> data type-must contain a proper value: C, D, L, M or N It is possible
>>>> to
>>>>>> use additional letters (or clarity (e.g., 'Numeric' for 'N'): however,
>>>> the
>>>>>> first letter of this array element must be a proper value.
>>>>>>
>>>>>>
>>>>>> The DBCREATE( ) function does not use the decimal field to calculate
>> the
>>>>>> length of a character held longer than 256. Values up to the maximum
>> length
>>>>>> of a character field (which is 65,519 bytes) are stored directly in
>> the
>>>> database
>>>>>> in the length attribute if that database was created via this
>>>>>> function.
>>>> However,
>>>>>> a file containing fields longer than 256 bytes is not compatible with
>>>> any
>>>>>> interpreter.
>>>>>>
>>>>>>
>>>>>> The <cDriver> parameter specifies the name of the Replaceable Da-
>>>>>> tabase
>>>>>> Driver to use to create the database. If it is not specified, then
the
>>>> Replaceable
>>>>>> Database Driver in the current work area is tised. The <lOpenNew>
>>>>>> parameter
>>>>>> specifies if the already created database is to be opened, and where.
>>>> If
>>>>>> NIL, the file is not opened. If True, it is opened in a New area,
and
>>>> if
>>>>>> False it is opened in the current area (closing any file already
>>>>>> occupying
>>>>>> that area). The <cAlias> parameter specifies the alias name for the
>> new
>>>> opened
>>>>>> database
>>>>>> Examples
>>>>>> function main()
>>>>>>
>>>>>> local nI, aStruct := { { "CHARACTER", "C", 25, 0 }, ;
>>>>>> { "NUMERIC", "N", 8, 0 }, ;
>>>>>> { "DOUBLE", "N", 8, 2 }, ;
>>>>>> { "DATE", "D", 8, 0 }, ;
>>>>>> { "LOGICAL", "L", 1, 0 }, ;
>>>>>> { "MEMO1", "M", 10, 0 }, ;
>>>>>> { "MEMO2", "M", 10, 0 } }
>>>>>>
>>>>>> REQUEST DBFCDX
>>>>>>
>>>>>> dbCreate( "testdbf", aStruct, "DBFCDX", .t., "MYALIAS" )
>>>>>>
>>>>>> RETURN NIL
>>>>>>
>>>>>> Files
>>>>>>
>>>>>>
>>>>>> Library is rdd Header is Dbstruct.ch
>>>>>>
>>>>>>
>>>>>> Look at XailerxHarbourdocchmxHarbour.chm
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ingo
>>>>>>
>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>> Dear Ingo,
>>>>>>>
>>>>>>> Will this code work when I use different RDD ? such as CDX & ADS
?
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>> Ingo Junge-Herrmann wrote:
>>>>>>>> David,
>>>>>>>>
>>>>>>>> TDbfDataSet():Create() is a constructor of the DataSet object not
>> the
>>>>>> creator
>>>>>>>> of the dbf-file.
>>>>>>>> Use
>>>>>>>>
>>>>>>>> DBCREATE(cFile,aFieldList)
>>>>>>>>
>>>>>>>> to build a new database.
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>> Ingo
>>>>>>>>
>>>>>>>> david fung <davfung@yahoo.com> wrote:
>>>>>>>>> I tried to create a physical DBF file with the following but failed
>>>> !
>>>>>>>>> Any comment ?
>>>>>>>>>
>>>>>>>>> METHOD Button1Click( oSender ) CLASS Tform1
>>>>>>>>> Local afieldlist := { {"KEYFLD1", "C", 10, 0}, ;
>>>>>>>>> {"KEYFLD2", "D", 8, 0}, ;
>>>>>>>>> {"FLD3", "C", 20, 0} }
>>>>>>>>> Local cFile := "MyClient.DBF", lDbf
>>>>>>>>>
>>>>>>>>> WITH OBJECT lDBF := TDbfDataSet():Create(Self, ::oDataSource,
>> cFile)
>>>>>>>>> :afields := afieldlist
>>>>>>>>> END WITH
>>>>>>>>>
>>>>>>>>> RETURN Nil
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>>
>>>>
>>
>
>