asp classic - Error when querying a CSV file -
i have server running windows server 2003 iis 6.0. classic asp application works there. i've been trying application work on iis 7 , windows server 2008 in new server provide company wants migrate, i've been struggling when querying csv file.
the code same in both enviroments, , while works on iis 6 machine, refuses let me access recordset generated query.
here code:
set conexcel = server.createobject("adodb.connection") 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 * ["& strfile &"]" set sql = server.createobject("adodb.recordset") sql.open strsql,conexcel
the csv file has several columns. 1 of them called name. code store in variable following:
strname = sql("name")
the error when running on iis 7 classic "item cannot found in collection corresponding requested name or ordinal". couldn't find on web related changes in iis 7 affect feature. sorry long post.
what happens if change sql sentence
strsql = "select [name] strname ...."
and read sentence to
strname = sql("strname")
Comments
Post a Comment