Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2006, 07:02 AM
marava marava is offline
Junior Member
 
Join Date: Jun 2006
Posts: 3
Default ADOQuery to DBF

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
Reply With Quote
  #2  
Old 06-09-2006, 04:52 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: ADOQuery to DBF

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
Reply With Quote
  #3  
Old 06-10-2006, 02:24 AM
Muhammad Muhammad is offline
Senior Member
 
Join Date: Jan 2003
Posts: 399
Default RE: ADOQuery to DBF

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
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

Forum Jump


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.