We help IT Professionals succeed at work.

Ttable and text file

nk51
nk51 asked
on
Medium Priority
535 Views
Last Modified: 2010-04-04
How to use a Ttable to read an ASCII text file with ; as field separator and CRLF as lien separator ?
Comment
Watch Question

Author

Commented:
I nead examples...

Commented:
Which delphi version?

Author

Commented:
With Delphi 3.0
Hey Zif, how is our site going? I kinda looked at it, but it seems to stay the same. What Mirek's been doing this week?

Regards,
Viktor Ivanov

Commented:
viktornet,
 yes it seems that nobody works on it anymore... this may not happen... I don't know what Mirek is doing this week.
Zif.

Commented:
nk51,

 Do you want to convert ascii-files into a table?
 What do you know?
 - the structure of the ascii-file?
 - ...

 Or can it be anything ?

Zif.

Author

Commented:
I have an ascii file.
I have a ttable linked to a Paradox table.
I want to put the informations from the ascii file to the Paradox table using Delphi 3.0.
I saw a ttable has a TableType property,
so I think it's possible to use a Ttable to do this operation.
Do you think it's a good way or have you an other solution to my problem ?
Thank you.

Commented:
Hi nk51,

first read this document :

http://www.inprise.com/devsupport/delphi/ti_list/TI2844.html

If it doesn't work like they propose, then you can do the following things :

1. With a KNOW format : read line by line and add the records yourself to a table
2. With an UNKNOWN format : use a component which can transform the file to a table. There are some on the net and Inter has made one also some time ago.

Regards, Zif.

Author

Commented:
The answer is incomplete regarding the request.
ZifNab give me a part of the answer but it's insufficient for me because I asked how to "link" an ascii text file with a Ttable. The Technical Information 2844 doesn't explain it.
Now, I know how to create a schema file for the ascii driver of the BDE but I don't know how to link it to a Ttable...
A good and complete answer is wanted to receive lots of points (200 points)...
For a very good answer, I give you 500 points.
Thanks

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
nk51,

 Offcourse you can use a datasource to connect to your table and then use the datasource for connecting your file to a dbgrid, etc.

PS. If you just use a small database, i.e. just a small ascii-file, then you can also use this freeware component :

http://home.sprynet.com/sprynet/rrm/qdb.html

It's a database, that doesn't need the BDE (=3 3,5"). With QDatabase you don't need to install the BDE on a clients computer, when you just need a small database.

On the otherhand, if the ascii-file is just for entering new data in a big database, just stick with BDE.

Regards, Zif.

Author

Commented:
Now, the answer is complete and very satisfactory. You're the expert I thinked ZifNab !!!
Thank you for your effort! You don't regret it !

Author

Commented:
Now, the answer is complete and very satisfactory. You're the expert I thinked ZifNab !!!
Thank you for your effort! You don't regret it !
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.