BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Importing data into a dBASE table

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
DA Brookes
Guest





PostPosted: Wed Jan 07, 2004 2:52 pm    Post subject: Importing data into a dBASE table Reply with quote



Hi

I'm trying to insert data from either a tab delimited or comma separated
file, depending upon a user's selected file choice..
I'm using D6 Enterprise.

Does anyone have any examples that could assist me please..

Regards

Dave


Back to top
Scott Metzger
Guest





PostPosted: Wed Jan 07, 2004 3:50 pm    Post subject: Re: Importing data into a dBASE table Reply with quote



DA Brookes wrote:
Quote:
Hi

I'm trying to insert data from either a tab delimited or comma separated
file, depending upon a user's selected file choice..
I'm using D6 Enterprise.

Well, doing this through your rdbms greatly depends on the databse you
are using (which you failed to mention).

However, if you need to do this by hand take a look at TStringList.
With this you can read in a file, set what the delimiters are, and then
writer the data to a database. I recently used TStringList to parse
some data that a Perl programmer said "Well that would be quite difficult".

Scott Metzger


Back to top
Mike Shkolnik
Guest





PostPosted: Wed Jan 07, 2004 4:33 pm    Post subject: Re: Importing data into a dBASE table Reply with quote



1. you may use TBatchMove component and link your dBase table with defined
ASCII-table (see help for BDE how to define scheme file for ASCII)

2. parse text file and load every parsed value
3. use third-party component - for example, see SMImport
(http://www.scalabium.com/smi)
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com

"DA Brookes" <david.brookes (AT) removespaminterserveprojects (DOT) com> wrote in
message news:3ffc1cc3 (AT) newsgroups (DOT) borland.com...
Quote:
Hi

I'm trying to insert data from either a tab delimited or comma separated
file, depending upon a user's selected file choice..
I'm using D6 Enterprise.

Does anyone have any examples that could assist me please..

Regards

Dave





Back to top
Bill Todd (TeamB)
Guest





PostPosted: Wed Jan 07, 2004 8:12 pm    Post subject: Re: Importing data into a dBASE table Reply with quote

On Wed, 07 Jan 2004 10:50:30 -0500, Scott Metzger
<NOSPAMScottCMetzger (AT) earthlink (DOT) net> wrote:

Quote:
Well, doing this through your rdbms greatly depends on the databse you
are using (which you failed to mention).

The subject says :into a dBase table". :)

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Back to top
Bill Todd (TeamB)
Guest





PostPosted: Wed Jan 07, 2004 8:15 pm    Post subject: Re: Importing data into a dBASE table Reply with quote

You can read a comma delimited ASCII file with the BDE ASCII driver.
See http://community.borland.com/article/0,1410,15892,00.html for
details. This will not work for tab delimited files.

You can roll your own routine quite easily using a TStringList to
parse the record. See the DelimitedText property of TStringList in the
on-line help.


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Back to top
Ignacio Vazquez
Guest





PostPosted: Wed Jan 07, 2004 8:18 pm    Post subject: Re: Importing data into a dBASE table Reply with quote

Mike Shkolnik wrote:

Quote:
3. use third-party component - for example, see SMImport
(http://www.scalabium.com/smi)

I second SMImport and suggest using TDbf for the .dbf files:

http://www.sourceforge.net/projects/tdbf

--
Cheers,
Ignacio

Back to top
DA Brookes
Guest





PostPosted: Thu Jan 08, 2004 2:09 pm    Post subject: Re: Importing data into a dBASE table Reply with quote

Thanks for the suggestions guys...
Much appreciated

Regards

Dave


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.