Gossamer Forum
Home : Products : DBMan : Discussions :

Am I stupid? Need Tab delimted file

Quote Reply
Am I stupid? Need Tab delimted file
I would like to make my dbman implementation a tab delimted data base. I set:

# Database delimeter.
$db_delim = '\t';

(which I thought would make the file tab delimited)

This just puts the \t in there, not a tab, which means the last field gets a \ added to it in all the records.

I am sorry if this is a silly problem, but I don't know what to do about it.

Bob


Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
In Reply To:
gets a \ added to it in all the records
That is normal...No matter what delimiter character you use, it will place a delimter before the last field.

Like:

Code:

ID\tField1\tField2\tField3


Now, if you switched delimiters from pipe to tab delimited, then your database could've been corrupted in the process.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
So by having the /t in the database file, Is the database reading it as a actual {tab}?

Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
Not sure what you're asking. If you're asking does the database have the structure of:

fieldone blank space for tab fieldtwo blank space for tab fieldthree

No, it does not. The database would look like:

fieldone\tfieldtwo\tfieldthree



Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
OK, so how do I get it to be tab delimited?

Thx,

Bob


Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
Why does it have to be tab delimeted?
Can't you use | or :: or - ?

Paul Wilson.
Installations:
http://www.wiredon.net/gt/
Quote Reply
Re: Am I stupid? Need Tab delimted file In reply to
Bob:

After searching the forum thread I found a thread which states that to use the tab delimiter it is necessary to enter it into your .cfg file using double quotes such as:

$db_delim = "\t";

You must put double quotes around the \t part in order for Perl to translate it into a tab character.

I hope this solves your problem and gets you up and running.

If not try the fix included in the following thread although I'm not sure the situation is the same.
Thread reference: http://gossamer-threads.com/p/52774




Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/