Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.xharbour

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2012, 02:41 PM
Mauri
Guest
 
Posts: n/a
Default Header DBF created with DBFCDX

Byte 0 of the head of a DBF file with memo field created
RDD "DBFCDX" should be hexadecimal F5.
If you try the following test program:

*-----------------------------------------------------------------------
request DBFCDX

function Main()

local aStru := { { "CHARACTER", "C", 25, 0 }, ;
{ "NUMERIC", "N", 8, 0 }, ;
{ "DOUBLE", "N", 8, 2 }, ;
{ "DATE", "D", 8, 0 }, ;
{ "MEMO", "M", 10, 0}}

CLS

if file( "testhead1.dbf")
FErase( "testhead1.dbf" )
endif

if file( "testhead1.fpt")
FErase( "testhead1.fpt" )
endif

if file( "testhead2.dbf")
FErase( "testhead2.dbf" )
endif

if file( "testhead2.fpt")
FErase( "testhead2.fpt" )
endif

if .not. file( "testhead1.dbf") .and. ;
.not. file( "testhead1.fpt")
dbCreate( "testhead1", aStru, "DBFCDX")
copy file "testhead1.dbf" TO "testhead2.dbf"
copy file "testhead1.fpt" TO "testhead2.fpt"
endif

if file( "testhead2.dbf")
dbUseArea( .T., "DBFCDX", "testhead2", "TESTHEAD2", .T., .F. )
TESTHEAD2->( dbAppend() )
TESTHEAD2->CHARACTER := "test"
TESTHEAD2->NUMERIC := 1000
TESTHEAD2->MEMO := "data"
use
endif

? "END"

return nil

*--------------------------------------------------------------------------

we will see that the file you just created: testhead1.dbf has indeed the value F5 hex
but after the first append 0 byte has the value 30 hex.
This usually incompatible to ODBC.

TIA
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-22-2012, 08:10 PM
Ella Stern
Guest
 
Posts: n/a
Default Re: Header DBF created with DBFCDX

Hello,

>
> we will see that the file you just created: testhead1.dbf has indeed the value F5 hex
> but after the first append 0 byte has the value 30 hex.
> This usually incompatible to ODBC.
>


Please indicate the complete name of the ODBC driver you are planning to use, and the context, where you are invoking that ODBC driver: ADO or other connection string implemented in language X or Office version Y or .NET runtime version Z...it would be useful to see your connection string ( change the password and path info to impersonate it ).

Ella

Reply With Quote
  #3 (permalink)  
Old 07-23-2012, 05:32 PM
Enrico Maria Giordano
Guest
 
Posts: n/a
Default Re: Header DBF created with DBFCDX

> we will see that the file you just created: testhead1.dbf
> has indeed the value F5 hex but after the first append 0
> byte has the value 30 hex.


I confirm the problem: after the append, the first byte of the DBF becomes
30 hex (it should be F5 hex).

EMG


Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:13 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.