Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table File Type settings in VFP9
Message
From
06/05/2006 23:18:15
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01119850
Message ID:
01119915
Views:
17
Hi Sergey,

From the VFP Help on table structures.

FoxBASE: 0x03 3
FoxBASE+/Dbase III plus, no memo: 0x30 48
Visual FoxPro: 0x31 49
Visual FoxPro, autoincrement enabled: 0x32 50
Visual FoxPro, Varchar, Varbinary, or Blob-enabled: 0x43 67
dBASE IV SQL table files, no memo: 0x63 99
dBASE IV SQL system files, no memo: 0x83 131
FoxBASE+/dBASE III PLUS, with memo: 0x8B 139
dBASE IV with memo: 0xCB 203

It looks like a formatting error in the documentation.


>Hi Neil,
>
>The table type 67 (0x43) is dBASE IV SQL table with no memo field. The table type 50 (0x32) is Visual FoxPro with a Varchar, Varbinary or Blob field (Visual FoxPro 9 and greater). BTW, what specs are you refering to?
>
>
>>Added Type 67 0x43 (Varchar) at the end
>>
>>CLEAR
>>CLOSE DATABASES ALL
>>lcCmd = [CREATE TABLE Testxxx ( cc C(20), mm M] + [)]
>>= ShowTableType(lcCmd,48)
>>lcCmd = [CREATE TABLE Testxxx ( cc C(20), mm M] + [, ii I AUTOINC] + [)]
>>= ShowTableType(lcCmd,49)
>>lcCmd = [CREATE TABLE Testxxx ( cc C(20), mm M, ii I AUTOINC] + [, vv v(20)] + [)]
>>= ShowTableType(lcCmd,50)
>>lcCmd = [CREATE TABLE Testxxx ( cc C(20), mm M, ii I AUTOINC] + [, qq Q(20)] + [)]
>>= ShowTableType(lcCmd,50)
>>lcCmd = [CREATE TABLE Testxxx ( cc C(20), mm M, ii I AUTOINC] + [, ww W] + [)]
>>= ShowTableType(lcCmd,50)
>>cCmd = [CREATE TABLE Testxxx ( cc V(20), mm M] + [)]
>>= ShowTableType(lcCmd,67)
>>RETURN
>>*-------------------------------------------------------
>>
>>FUNCTION ShowTableType(tcCmd, tnExpected)
>>&tcCmd
>>USE
>>lnTableType = ASC(FILETOSTR("Testxxx.dbf"))
>>?
>>? lcCmd
>>? "Table Type: " + TRANSFORM(lnTableType )
>>IF lnTableType <> tnExpected
>>	?? " - Expected ", TRANSFORM(tnExpected)
>>ENDIF	
>>RETURN
>>
>>>
>>>>I have been testing Varchar, Varbinary & Blob field types in VFP9.
>>>>
>>>>One thing I have noticed is that the File type in the DBF Header is only being set to 0x32,
>>>>which is the setting for Auto-increment, and not 0x43 as stated in the specs.
>>>>
>>>>Is this going to cause problems, especially when you have Autoinc and say a Varchar and a Blob field in the same table and the Type set to 0x32, and not 0x43 as it should be.
Regards N Mc Donald
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform