Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 9th, 2009, 11:45 AM
Registered User
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using VBScript, Open Recordset in ASP Page Using CSV as Source

I have a file, Capacity.asp in a folder, JobStatus, that contains a csv file, Capacity.csv. I need to open a recordset in the asp page that uses the .csv file as a source. I've been googling myself silly for the last 2 days and all I get is how to download a recordset to a csv file.

How do I open a recordset using a csv file as the source in an asp page that is written in VBScript?
Old July 9th, 2009, 03:36 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts


Scroll down to "You can also open a Text file using the JET OLE DB Provide".

Note that by default you will need a true CSV file for this. That is, commas between fields, with optional quotes around field values.

If you have extended needs (e.g., TAB between fields, or maybe fields are enclosed in apostrophes), you will need to set up a "schema.ini" file in the same directory as the CSV file. You can search MSDN for "schema.ini". One link to start you is here:

Old July 9th, 2009, 03:37 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

Caution: Note that the connection string specifies only the *DIRECTORY* where the file is located. Many people miss that point and try to use connection.open to get to the actual CSV file. You specify the file name in the SQL query.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please review open-source ASP.NET shopping cart nopCommerce ASP.NET 3.5 Professionals 0 October 31st, 2008 05:18 PM
Putting VBScript in an ASP.NET page jturlington ASP.NET 1.0 and 1.1 Basics 1 May 14th, 2005 09:00 PM
Optimization of ASP page with VBScript anandham VBScript 0 April 18th, 2005 05:03 AM
csv file data source q's kap260 Classic ASP Databases 0 August 4th, 2003 04:17 PM
Using quotes in VBSCript and an asp page dragonfields Classic ASP Basics 2 July 31st, 2003 10:30 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.