One of my clients has a program written in Delphi that uses Paradox
data files. Is there a way to read/write to Paradox databases? I haven't seen much on the news group. This would be my first project in Dolphin Pro (and my first Smalltalk project in a few years!). Thanks! Jen |
Jen,
> One of my clients has a program written in Delphi that uses Paradox > data files. Is there a way to read/write to Paradox databases? I > haven't seen much on the news group. ODBC should do the job; there are some examples in the D4 documention. You might want to look at ReStore and GLORP. My understanding is that ReStore expects to control the schema, but please don't take my word for it. I have never used GLORP, but be aware that the latest version might not have been ported to Dolphin. IIRC, Paradox tables live in multiple files, with somewhat confusing error messages resulting if they are not all present. > This would be my first project in Dolphin Pro (and my first Smalltalk > project in a few years!). Happy Smalltalking! Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
"Bill Schwab" <[hidden email]> wrote in message
news:c20jfk$mu2$[hidden email]... > ODBC should do the job; there are some examples in the D4 documention. You Thanks! I guess a good question for me to ask is: How reliable is using ODBC to access the Paradox tables? I assume that reading is okay; writing I have some qualms about. Also, are the drivers part of the MDAC download, part of Office, or come with recent copies of Windows? Anyone with experience care to comment? > Happy Smalltalking! Thanks! Jen |
In reply to this post by Bill Schwab-2
Bill,
> ODBC should do the job; there are some examples in the D4 documention. You > might want to look at ReStore and GLORP. My understanding is that ReStore > expects to control the schema, but please don't take my word for it. You're absolutely correct - ReStore creates the database schema based on your object model, and as such is primarily targeted for new developments, or redevelopments where the database can also be modified. More information here: http://www.solutionsoft.co.uk/restore Jen - if your Dolphin application needs to co-exist with the current Delphi app, then GLORP would probably be more appropriate - with the caveat that I'm unfamiliar with using Paradox, via ODBC or otherwise. Depending on how arcane Paradox is, you may need to augment GLORP, or possibly read/write to Paradox direct from your Smalltalk code. If however you have the luxury of redefining/recreating the database then please take a look at ReStore. Best regards, John Aspinall Solutions Software |
In reply to this post by Jen Wu
On Mon, 1 Mar 2004 16:34:30 -0800,
Jen Wu <[hidden email]> wrote: > "Bill Schwab" <[hidden email]> wrote in message > news:c20jfk$mu2$[hidden email]... >> ODBC should do the job; there are some examples in the D4 documention. yes, it should, but ... > Thanks! I guess a good question for me to ask is: How reliable is using ODBC > to access the Paradox tables? I assume that reading is okay; writing I have Sorry to put on a damper here, but I had a very _strange_ effect when I needed to read Paradox tables into a Dolphin app some time ago. It was not Dolphin's fault, mind you, the same effects appeared with a Visual Basic port of my solution and apparently were caused by a bug in the ODBC driver for Paradox, which seems to be available at least if you have some MSOffice stuff installed. Reading a single table never went wrong, but joining two tables with a basic "inner join" went horribly wrong: Most of the results were right, some were not. What I did in the end: I wrote a small Delphi DLL to export the data into text files (something like CSV), call this with the SQL statement and the output file name and parse the stuff back into Dolphin. Clumsy, but very reliable. If this a way to go for you, I could dig out the sources. > > Anyone with experience care to comment? > Avoid Paradox if you're not coming via BDE. s. -- Stefan Schmiedl +-------------------------------+----------------------------------------+ |Approximity GmbH | EDV-Beratung Schmiedl | |http://www.approximity.com | Am Bräuweiher 4, 93499 Zandt, Germany | |mailto:[hidden email] | Tel. (09944) 3068-98, Fax -97 | +-------------------------------+----------------------------------------+ |
"Stefan Schmiedl" <[hidden email]> wrote in message
news:c22833$1o4gtc$[hidden email]... > On Mon, 1 Mar 2004 16:34:30 -0800, > Sorry to put on a damper here, but I had a very _strange_ effect when > I needed to read Paradox tables into a Dolphin app some time ago. Weird. Do you know what version of MDAC you were using? I know that Access 97 has some issues. Access 2000 works a lot better. Not sure if Access uses MDAC or has its own thing, though. Anyone know about that? Also, does anyone know of 3rd party ODBC drivers that might be better? Intersolv used to make some, but I don't know if they do any longer (I didn't see anything on data-direct's Web site, which is where intersolv.com goes to now). > What I did in the end: I wrote a small Delphi DLL to export the data > into text files (something like CSV), call this with the SQL statement > and the output file name and parse the stuff back into Dolphin. > Clumsy, but very reliable. Is there a reason you did this instead of writing it in Dolphin? You said single-table reads were okay, so would it be okay to have Dolphin dump single tables to some other format like Access and run the query on that? Of course, if reads are problematic, then writes are just out of the question. If anyone has any other suggestions on interfacing with Paradox (and moving isn't an option as this is interfacing with a legacy app), I'd love to hear about it! Thanks! Jen |
On Tue, 2 Mar 2004 09:40:30 -0800,
Jen Wu <[hidden email]> wrote: > "Stefan Schmiedl" <[hidden email]> wrote in message > news:c22833$1o4gtc$[hidden email]... >> On Mon, 1 Mar 2004 16:34:30 -0800, >> Sorry to put on a damper here, but I had a very _strange_ effect when >> I needed to read Paradox tables into a Dolphin app some time ago. > > Weird. Do you know what version of MDAC you were using? I know that Access > 97 has some issues. Access 2000 works a lot better. Not sure if Access uses All I can say right now is that this happened on Windows 2000 boxes with Office 2000 (release and service pack 1, IIRC), and on XP with Office 2000, too. The main point is that you *might* run into trouble, when (not if) your software is going to run on one of those systems. It also might have to do with the version of the Paradox tables in use. I know that my client has a liberal mix of v4, v5 and v7 in use ... > MDAC or has its own thing, though. Anyone know about that? Also, does anyone > know of 3rd party ODBC drivers that might be better? Intersolv used to make > some, but I don't know if they do any longer (I didn't see anything on > data-direct's Web site, which is where intersolv.com goes to now). > >> What I did in the end: I wrote a small Delphi DLL to export the data >> into text files (something like CSV), call this with the SQL statement >> and the output file name and parse the stuff back into Dolphin. >> Clumsy, but very reliable. > > Is there a reason you did this instead of writing it in Dolphin? You said > single-table reads were okay, so would it be okay to have Dolphin dump > single tables to some other format like Access and run the query on that? The main reason was that after the fun I had debugging where I never expected to need to, I decided to use the technology that I knew would work to extract the data I needed. Lucky for me, I needed only read access there. And I don't believe that reading > 60k rows with about 10 fields and > 6k rows with about 40 fields would be that much faster than using the delphi dll to export the 500 rows with about 15 fields that I actually need for the task at hand. > > Of course, if reads are problematic, then writes are just out of the > question. If anyone has any other suggestions on interfacing with Paradox > (and moving isn't an option as this is interfacing with a legacy app), I'd > love to hear about it! There is a description of the binary format of paradox tables somewhere on the 'net, but I don't think that you want to go there. s. -- Stefan Schmiedl +-------------------------------+----------------------------------------+ |Approximity GmbH | EDV-Beratung Schmiedl | |http://www.approximity.com | Am Bräuweiher 4, 93499 Zandt, Germany | |mailto:[hidden email] | Tel. (09944) 3068-98, Fax -97 | +-------------------------------+----------------------------------------+ |
In reply to this post by Jen Wu
Hi Jen,
Being a Delphi programmer for many years and knowing how funny Paradox tables can be, I would recommend that you use Delphi to manipulate Paradox tables. I'm not saying this becuase I think Delphi is better than Dolphin, but because I know how "delicate" paradox tables can be and I think you would be better off using a tool that was designed to work with them. If there is any way you can convince your client to store his/her data in anything else I would recommend that too. The sooner the world stops using Paradox tables, the better, IMHO. Delphi supports many databases so it shouldn't be too difficult to knock together a small app that will move the data across to a new database. Good luck jennyw wrote: > One of my clients has a program written in Delphi that uses Paradox > data files. Is there a way to read/write to Paradox databases? I > haven't seen much on the news group. > > This would be my first project in Dolphin Pro (and my first Smalltalk > project in a few years!). > > Thanks! > > Jen -- Cheers Barry Carr Ixian Software Components Ltd Blairgowrie Perthshire Scotland |
In reply to this post by Stefan Schmiedl
You might have a look at the indexes. I had problems with connected
tables from Access, but after setting the correct indexes everything worked fine. Good luck, Nico Stefan Schmiedl wrote: > On Mon, 1 Mar 2004 16:34:30 -0800, > Jen Wu <[hidden email]> wrote: > >>"Bill Schwab" <[hidden email]> wrote in message >>news:c20jfk$mu2$[hidden email]... >> >>>ODBC should do the job; there are some examples in the D4 documention. > > > yes, it should, but ... > > >>Thanks! I guess a good question for me to ask is: How reliable is using ODBC >>to access the Paradox tables? I assume that reading is okay; writing I have > > > Sorry to put on a damper here, but I had a very _strange_ effect when > I needed to read Paradox tables into a Dolphin app some time ago. > > It was not Dolphin's fault, mind you, the same effects appeared with a > Visual Basic port of my solution and apparently were caused by a bug in > the ODBC driver for Paradox, which seems to be available at least if you > have some MSOffice stuff installed. > > Reading a single table never went wrong, but joining two tables with a > basic "inner join" went horribly wrong: Most of the results were right, > some were not. > > What I did in the end: I wrote a small Delphi DLL to export the data > into text files (something like CSV), call this with the SQL statement > and the output file name and parse the stuff back into Dolphin. > Clumsy, but very reliable. > > If this a way to go for you, I could dig out the sources. > > >>Anyone with experience care to comment? >> > > > Avoid Paradox if you're not coming via BDE. > > s. > > -- > Stefan Schmiedl > +-------------------------------+----------------------------------------+ > |Approximity GmbH | EDV-Beratung Schmiedl | > |http://www.approximity.com | Am Bräuweiher 4, 93499 Zandt, Germany | > |mailto:[hidden email] | Tel. (09944) 3068-98, Fax -97 | > +-------------------------------+----------------------------------------+ |
In reply to this post by Jen Wu
[hidden email] (jennyw) wrote in message news:<[hidden email]>...
> One of my clients has a program written in Delphi that uses Paradox > data files. Is there a way to read/write to Paradox databases? I > haven't seen much on the news group. > > This would be my first project in Dolphin Pro (and my first Smalltalk > project in a few years!). > > Thanks! > > Jen Jen, As suggested by other posts the most direct route would be ODBC. But if you needed to be independent of ODBC then writing your own interface into the files (at least for reading) is something I have done for Dbase files. It took a couple of weeks but in the end gave me code that was much easier to install on a large variety of machines. Note that you do not have to solve the general problem of reading any Paradox file, only those that you are trying to read. Also you should look at : http://pxlib.sourceforge.net this is a c library that may do most of what you want. Regards |
In reply to this post by Nico de Boer-2
On Tue, 02 Mar 2004 19:52:12 +0100,
Nico de Boer <[hidden email]> wrote: > You might have a look at the indexes. I had problems with connected > tables from Access, but after setting the correct indexes everything > worked fine. How would I do that for an inner join of two tables? I did not import or link px-tables, I "just" wanted to read them via ODBC and failed miserably at that. But that is history now. > > Good luck, It's astonishing, how often those two words occur, when somebody asks about accessing Paradox tables without using BDE :-) s. |
In reply to this post by Jen Wu
Jen Wu wrote:
> Weird. Do you know what version of MDAC you were using? I know that Access > 97 has some issues. Access 2000 works a lot better. Not sure if Access > uses MDAC or has its own thing, though. Anyone know about that? Also, > does anyone know of 3rd party ODBC drivers that might be better? > Intersolv used to make some, but I don't know if they do any longer (I > didn't see anything on data-direct's Web site, which is where > intersolv.com goes to now). Googling around sugests that MS's Paradox OBDC driver is not well regarded. This thread is typical: http://www.tek-tips.com/gviewthread.cfm/lev2/4/lev3/27/pid/177/qid/753973 (see the last message in the thread). Incidentally the Data-Direct Paradox driver (which I consider expensive at nearly 400 UKP for a 5-seat licence) can be found by going to the online store ( http://www.datadirect.com/shop/shop_index.asp ), choosing a currency, and then following the bottom link to the "flat files" drivers. BTW, please don't take the above as implying that I possess any knowledge *whatsoever* of Paradox/ODBC... -- chris |
Free forum by Nabble | Edit this page |