Re: Java and JDBC
- From: John <no@email>
- Date: Mon, 23 May 2005 13:24:47 +0100
Sharp wrote:
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?
The format has nothing to do with it, it is the editors that you are using.
I plan to import the sequence as a memo field, which I heard can take many characters.
I don't know what a memo field is.
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.
If this is a regular task, I would take this "FASTA" data source and parse it, then write rows to the relevant database table (using JDBC).
If it is a one-off task then I would use Perl to chop the input into a file that the database can read. If access has a problem with the length of the fields than I would suggest using a more useful database (MySQL perhaps).
John.
Any advice appreciated.
Cheers Sharp
.
- References:
- Java and JDBC
- From: Sharp
- Java and JDBC
- Prev by Date: Java and JDBC
- Next by Date: Re: pb with getString on a preparedStatement with sum
- Previous by thread: Java and JDBC
- Index(es):
Relevant Pages
|