| View previous topic :: View next topic |
| Author |
Message |
Steven Newbie

Joined: 20 Nov 2003 Posts: 2
|
Posted: Thu Nov 20, 2003 1:29 pm Post subject: Relational DB |
|
|
is it possible to set up a relational database if all sources are text files OR
can you build a dummy relational database which will read text files into tables |
|
| Back to top |
|
 |
tony.groves OOo Enthusiast

Joined: 24 Aug 2003 Posts: 117 Location: Ireland
|
Posted: Thu Nov 20, 2003 4:48 pm Post subject: |
|
|
| If it's Windows you are using, then you might be in luck. I looked at my ODBC driver collection, and noticed that there is a Microsoft Text ODBC Driver for *.txt and *.csv files. I've never used it but I'd be surprised if it didn't work as expected. I can't remember how I got it, but I'd imagine it was a free download from Microsoft. |
|
| Back to top |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Thu Nov 20, 2003 8:11 pm Post subject: |
|
|
| If you want to use more than one table at a time in OOo (for example in form/subform)which I think you are implying by the term 'relational', TEXT, DBASE and SPREADSHEET will not do. If you dig down far enough you will find a documented restriction but it stands out because when you design a query, you will not get the invitation to add a table if the first one is text. |
|
| Back to top |
|
 |
avantman42 Super User

Joined: 28 Jul 2003 Posts: 751 Location: Staffordshire, UK
|
Posted: Fri Nov 21, 2003 3:04 am Post subject: |
|
|
I've just done a quick experiment, and managed to use two csv files in a relational database. The key was to set up an ODBC connection (using the text driver) to the directory containing the csv files, then use the ODBC connection as the data source. I'm reasonably sure that the ODBC text driver ships as a standard part of Windows (there is also a DBase driver, so you might be able to use that instead if you prefer).
One thing, though. When the files were named Sheet1.csv & Sheet2.csv, I had problems with the queries, which I fixed by removing the .csv extensions from the files, so that they were named Sheet1 & Sheet2. It may be possible to fix the problem while keeping the extensions, but this was the first fix that I found.
Russ |
|
| Back to top |
|
 |
Steven Newbie

Joined: 20 Nov 2003 Posts: 2
|
Posted: Fri Nov 21, 2003 8:58 am Post subject: |
|
|
| Thanks for the replys guys however I am using solaris so I`ll have a dig around the solaris ODBC stuff and see what I can find |
|
| Back to top |
|
 |
|