Re: Loop through elements in row of a text file being treated as a Rec

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Sure, you can - I have some examples, but they're all in ooRexx.
Here's a link that should get you started.

BTW: If your .csv file has a header row witht the field/column names,
life will be much easier - if not you will have to create schema.ini
file.

http://www.microsoft.com/technet/scriptcenter/resources/qanda/may05/hey0524.mspx

Here's an even better link that contains comprehensive information on
using a schema.ini file to read a .csv without a header line.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting03092004.asp

Personally, I think ADO is a very powerful tool that is often
overlooked.

Lee

On Tue, 28 Jun 2005 11:45:06 -0700, "ebferro"
<ebferro@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>I have a text file that I've declared as a CSV text file. Each row in this
>text file has about 20 'columns' of data. Is there a way using the recordset
>object that I can loop through all of the columns in a particular row? The
>first column in every row contains an identifier. I'm using
>objRecordSet.Find to find the row for which I'm looking. Now, I'd like to
>read each column of data in that row and use that as search criteria to
>select records from another database. Is there a method to loop through the
>columns in each row sequentially to do this?
>TIA
>Ernie

.



Relevant Pages

  • Loop through elements in row of a text file being treated as a Rec
    ... I have a text file that I've declared as a CSV text file. ... Is there a way using the recordset ... Is there a method to loop through the ... Prev by Date: ...
    (microsoft.public.scripting.vbscript)
  • Big problem with @array and Chomp ... I think :o
    ... I have a CSV content module. ... can take the contents of a CSV file, paste it into the textarea, and the ... Here is the code I use to add the entry ... Through a loop, I split each ...
    (comp.lang.perl.misc)
  • Re: Bulk User Import Using a VBScript
    ... Using VBScript, you can use ADO and the FileSystemObject to read in a CSV ... then use a big old loop with variables instead of explicitly defining ...
    (microsoft.public.windows.server.active_directory)
  • Re: Looping through File Question
    ... At present I am using this statement to initiate a loop though the ... But you did say you were reading a CSV file, ... for data_row in rdr: ... Here's an example of sucking your data into a list of lists and ...
    (comp.lang.python)
  • Re: Loop through elements in row of a text file being treated as a
    ... Richard: ... What I have is a .csv text file of multiple rows. ... I've done a connection open and recordset open on the text file so even ... has Data1 equal to some particular piece of information, I'd like to loop ...
    (microsoft.public.scripting.vbscript)