|
|
 |
| 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 computer programmers 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 programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
|
 |

July 9th, 2009, 12:45 PM
|
|
Registered User
|
|
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|

July 9th, 2009, 04:36 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,354
Thanks: 3
Thanked 72 Times in 71 Posts
|
|
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
|

July 9th, 2009, 04:37 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,354
Thanks: 3
Thanked 72 Times in 71 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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |