Re: Reading C-ISAM Data with Borland Delphi
Posted in 1997
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Migration, Import/Export & Data Conversion
Michael Segel <"MailerDaemon"@[127.0.0.1]> wrote in article <6352q0$1a0@argentina.earthlink.net>... > Bob Findley wrote: > > > > Use Delphi and ODBC ( C is not required ). > > Not commenting on Delphi as a tool, it is not the best tool > for the job in this instance. > > The data resides on the server in a flat file. > The data format is fairly straight forward. > > To use Delphi is a bit of a braindead approach. Yeah it's a no brainer. He has it, he knows it, and it will work. > First, is there an ODBC for C-ISAM? > (Lets assume that there is.) > Second. Your job is to convert the data from one format > to another so that you can load it in to a different database. Delphi can do this quite easily. with DBTable1 do begin with DBTable2 DO begin Exclusive := TRUE; end; DBLBatchMove.Mode := batCopy; DBLBatchMove.Execute; end; Table 1 can be Dbase, Paradox, Foxpro, Access, ASCII, or any ODBC Data. Table 2 can be Dbase, Paradox, Foxpro, Access, ASCII, or any ODBC Data. > Using a PC tool is a mistake. First, you are opening a network > connection reading the data to your pc, then loading the data > back across the network to either the same server or a different > server. (So now the program is slow.) Use what you have and what you know and what you like. > In C, you just open the DB table as a file, read in either > a fixed length string, or until an EOL character. (I forget > if C-ISAM stores each record with a \\n at the end of the record.) > Then you can parse your data out. You can > either write it to a record and insert into an Informix DB, > or you can write it out as a comma delimited file which can > be imported to any db. > If your data has an occurs clause, then you have some more programming. And why can't I do this in Delphi or any other language for that matter. In fact I already do this with a Micro Focus file. > Not to pick on Delphi, but chose the best tool. > For data migration, C is best! I think C would work here, But so would Delphi (equally). I just don't care for C. I used it for an IVR application that will be rewritten this year using Delphi. Just my opinion, I could be wrong. Bob Findley ------------------------------------------------------------------ The new rules of the devlopment process: Alpha Testing: A Clean Compile. Beta Testing: Put it in Production. ------------------------------------------------------------------