Java and MS Access

S

Sharp

Hi

I'm trying to convert a file in FASTA format to a text file in TABLE
(delimited by tab) format for MS Access.

EXAMPLE:

from FASTA format:
12345 a description
ATATATATATATATATATAT
ATATATATTATATATATATT

to TABLE format:

12345 ATATATATATATATATATATATATATATTATATATATATT


PROBLEM:

Sometimes the sequence of A's and T's is so long that even in notepad, it
will wordwrap, despite having wordwrap set off. WordPad does a better job
than notepad, and will accept a little more characters per line, but still
in some cases the sequence is too long that it reaches the line maximum and
begins to word wrap. The problem of wrapping is that it becomes difficult to
import the text file into MS Access reliably.


QUESTIONS:

Is there another format I could use that will allow extremely long lines?
I plan to import the sequence as a memo field, which I heard can take many
characters.
I guess another solution is to use JDBC to connect directly to the database
and import it directly to a table, thereby avoiding the need to save it as a
textfile (doesn't work anyway) before I import.

Any advice appreciated.

Cheers
Sharp
 
J

John C. Bollinger

Sharp said:
Hi

I'm trying to convert a file in FASTA format to a text file in TABLE
(delimited by tab) format for MS Access.

EXAMPLE:

from FASTA format:



ATATATATATATATATATAT
ATATATATTATATATATATT

to TABLE format:

12345 ATATATATATATATATATATATATATATTATATATATATT


PROBLEM:

Sometimes the sequence of A's and T's is so long that even in notepad, it
will wordwrap, despite having wordwrap set off. WordPad does a better job
than notepad, and will accept a little more characters per line, but still
in some cases the sequence is too long that it reaches the line maximum and
begins to word wrap. The problem of wrapping is that it becomes difficult to
import the text file into MS Access reliably.

Why do you have to involve a text editor? And what does any of that
have to do with Java? If you create the file in the correct
tab-delimited format in the first place, then can you not import it
directly into Access?
QUESTIONS:

Is there another format I could use that will allow extremely long lines?

You are not dealing with a limitation of the file format, you are
dealing with limitations of your viewers (Notepad / Wordpad).
I plan to import the sequence as a memo field, which I heard can take many
characters.

You would be well advised to compare the *specifications* for this field
type to the maximum field width you want to support.
I guess another solution is to use JDBC to connect directly to the database
and import it directly to a table, thereby avoiding the need to save it as a
textfile (doesn't work anyway) before I import.

You have not yet convinced me that the textfile solution doesn't work,
but if you do want to go with JDBC access to the DB, then you can do.
In that case you need to set up an ODBC data source corresponding to an
existing Access DB, then connect to it via the JDBC:ODBC bridge driver.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top