| View previous topic :: View next topic |
| Author |
Message |
DA Brookes Guest
|
Posted: Wed Jan 07, 2004 2:52 pm Post subject: Importing data into a dBASE table |
|
|
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
|
Posted: Wed Jan 07, 2004 3:50 pm Post subject: Re: Importing data into a dBASE table |
|
|
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
|
Posted: Wed Jan 07, 2004 4:33 pm Post subject: Re: Importing data into a dBASE table |
|
|
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
|
Posted: Wed Jan 07, 2004 8:12 pm Post subject: Re: Importing data into a dBASE table |
|
|
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
|
Posted: Wed Jan 07, 2004 8:15 pm Post subject: Re: Importing data into a dBASE table |
|
|
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
|
Posted: Wed Jan 07, 2004 8:18 pm Post subject: Re: Importing data into a dBASE table |
|
|
Mike Shkolnik wrote:
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
|
Posted: Thu Jan 08, 2004 2:09 pm Post subject: Re: Importing data into a dBASE table |
|
|
Thanks for the suggestions guys...
Much appreciated
Regards
Dave
|
|
| Back to top |
|
 |
|