How to read CSV files line by line in VBScript

前端 未结 2 1998
孤独总比滥情好
孤独总比滥情好 2020-12-03 18:42

I am using an ASP page where I have to read a CSV file and insert it into DB table \"Employee\". I am creating an object of TestReader. How can I write a loop to execute up

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 19:03

    Why not just insert the CSV? For example:

    SELECT * INTO MyTable FROM OPENDATASOURCE('Microsoft.JET.OLEDB.4.0', 
    'Data Source=F:\MyDirectory;Extended Properties="text;HDR=No"')...
    [MyCsvFile#csv]
    

    From: http://coding.derkeiler.com/Archive/Delphi/borland.public.delphi.database.ado/2007-05/msg00057.html

提交回复
热议问题