Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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?
Reply With Quote
  #2 (permalink)  
Old July 9th, 2009, 03:36 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

http://www.carlprothman.net/Default....orMicrosoftJet
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet

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:
http://support.microsoft.com/kb/205439


Reply With Quote
  #3 (permalink)  
Old July 9th, 2009, 03:37 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.