|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Flat File ProcessingI'm attempting to develop a class that processes a flat file but i'm a little uncertain on the best approach. Here's what I have already in case you are able to provide any coments... A flat file is recieved that consists of an unknown number of repeated sections. The intention is to read each section in turn and then to import that sections data into a relational database (SQL Server) before moving onto the next section. I'm currently intending to call a class to test the file exists, to test the file contains data, to test the file contains valid data, to read the first section and return the data to the main app for inclusion into the database, to read the next section and return the data to the main app for inclusion into the database, ... Am I going to cause excesive load on the server by continually accessing the flat file using a FSO call? Woulkd it be better to read the entire file and save it into an array/recordset(?) and then import the data from that source? I'm a little limited in development style as I am restricted to VB6 and no XML. Any advice would be appreciated. <M> =?Utf-8?B?PE0+?= <M@discussions.microsoft.com> wrote in
news:265F0FD8-A032-46BC-B779-74D36C6DD9BB@microsoft.com: Look into Data Transformation Services. The objects can be referenced from > Any advice would be appreciated. > > <M> > VB and distributed as a stand-alone. Thanks for the tip Tim, but unfortunately all the validation routines for the
data have already been written by the receiving softwares manufactures and require that the data be passed to it through COM objects. As far as I understand, DTS won't pass the data back to a COM object as it'll only import (or transfer) the data to SQL Server or other data repositories. Any tips on the 'best approach' to dealing with these files? <M> Show quoteHide quote "Tim Baur" wrote: > > Look into Data Transformation Services. The objects can be referenced from > VB and distributed as a stand-alone. > =?Utf-8?B?PE0+?= <M@discussions.microsoft.com> wrote in
Show quoteHide quote news:824F3E9E-3DB3-4370-92B1-D699E7DC2A27@microsoft.com: Instead of a proactive approach, try a reactive one. Use DTS to plug > Thanks for the tip Tim, but unfortunately all the validation routines > for the data have already been written by the receiving softwares > manufactures and require that the data be passed to it through COM > objects. As far as I understand, DTS won't pass the data back to a COM > object as it'll only import (or transfer) the data to SQL Server or > other data repositories. > > Any tips on the 'best approach' to dealing with these files? > > <M> > > "Tim Baur" wrote: > >> >> Look into Data Transformation Services. The objects can be >> referenced from VB and distributed as a stand-alone. >> > the file into a temp table, query the data back into your object as a recordset, and use your validation routines to weed the bad ones. I don't think anything will be faster or easier than DTS for putting a file into SQL Server. Ok,
I'll give it a go as it certainly seems a better idea than opening and closing the file all the time. Thanks, <M> Show quoteHide quote > > Instead of a proactive approach, try a reactive one. Use DTS to plug > the file into a temp table, query the data back into your object as a > recordset, and use your validation routines to weed the bad ones. > > I don't think anything will be faster or easier than DTS for putting a > file into SQL Server. >
Functional IDE DLL call compiles to non-functional DLL call
Problem comparing double values Programatically design a form Testing for MAPI , again Date Time Picker Question Verify a person's name? VB 6 UCase failing Compile Error: Can't find project or library data structure equality Default Property in VB6 Class Name of Control under to mouse pointer |
|||||||||||||||||||||||