0

I have an online application that will query data from CSV file that the users send. It works like a charm in the server machine somewhere in the globe.

I decided to clone the application and database to my dev machine but the query gives me a Recordset error saying "Item cannot be found in the collection...", but wait, don't facepalm so soon.

Here is the code that queries the CSV file:

conExcel.Open "Provider=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("xls\") &";Extended Properties=""Text;HDR=Yes;IMEX=1; ImportMixedTypes=Text;FMT=Delimited(;)"""
strSQL="SELECT * FROM ["& strFile&"]"

The file has more than 10 columns and using the code below it only shows me 10 and a fragment of the 11th column. But in my online application it shows all of them just fine.

For each x in SQL.Fields            
    response.write x.Name
Next

I'm guessing it has something to do with my IIS, but I don't know where I could tweak to make both ambients behave the same way.

Counting on you, guys.

Lightspeed
  • 33
  • 5
  • Presumably your csv files are absolutely identical. A stray linebreak can really screw up a csv used as a datasource – John Nov 26 '14 at 16:54
  • try this to enable server side debugging for the error you're getting "item cannot be found..." http://stackoverflow.com/questions/1138175/how-do-you-debug-classic-asp – userDEV Nov 26 '14 at 16:57
  • @John Nah, no linebreaks detected. – Lightspeed Nov 26 '14 at 17:43
  • @userDEV Thanks for your input but I'm afraid the instructions weren't made for rookies. I'm stuck on Step 2. I don't think I have VS 2005, and how do I open ASP with it? And the instructions are for IIS 6, but mine is 7.5. Can I still follow it? – Lightspeed Nov 26 '14 at 18:22
  • Another thing to check, do you have a schema.ini file, and does it match the one on your production server. See http://msdn.microsoft.com/en-us/library/ms709353(v=vs.85).aspx NB Detailed error messages, (ie the type you see in your browser) are all I've ever needed to debug classic asp, and it sounds like you have that working already. I've never used VS for debugging – John Nov 26 '14 at 20:27

0 Answers0