![]() |
|
#1
|
|||
|
|||
|
I'm using TSMExportToDBF to export a Query to a DBF file using http://www.scalabium.com/sme/
But, can't find how can I define the lenght and type of the field ?? The format of the file is: Number (Integer 4) - Fecha (DateTime 8) - Hour (Char 5) Somebody knows if I can define this fields using TSMExportToDBF ?? Thx again for your help |
|
#2
|
|||
|
|||
|
Every item in Columns collection (field which will be created in dbf) have the DataType property (datetime/string/integer etc)
Also there are Width and Precision properties With best regards, Mike Shkolnik http://www.scalabium.com |
|
#3
|
|||
|
|||
|
Hello again...
try this code i hope it will help : [DELPHI] SMExportToDBF1.FileName := 'C:\Test.dbf'; with SMExportToDBF1.Columns.Add do begin FieldName := 'Number'; DataType:=ctInteger; Width:=4; end; with SMExportToDBF1.Columns.Add do begin FieldName := 'Fecha'; DataType:=ctDateTime; Width:=8; end; with SMExportToDBF1.Columns.Add do begin FieldName := 'Hour'; DataType:=ctString; Width:=5; end; SMExportToDBF1.Execute;[/DELPHI] Best Regards |
![]() |
| Thread Tools | |
| Display Modes | |
|
|