p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
I forgot my password Register Now
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 9th, 2009, 12:45 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old July 9th, 2009, 04:36 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 52%
Activity: 52% Activity: 52% Activity: 52%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old July 9th, 2009, 04:37 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 52%
Activity: 52% Activity: 52% Activity: 52%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 06:18 PM
Putting VBScript in an ASP.NET page jturlington ASP.NET 1.0 and 1.1 Basics 1 May 14th, 2005 10:00 PM
Optimization of ASP page with VBScript anandham VBScript 0 April 18th, 2005 06:03 AM
csv file data source q's kap260 Classic ASP Databases 0 August 4th, 2003 05:17 PM
Using quotes in VBSCript and an asp page dragonfields Classic ASP Basics 2 July 31st, 2003 11:30 AM



All times are GMT -4. The time now is 08:54 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc