This topic is locked

connection to text file on web server

2/1/2005 12:45:30 PM
ASPRunnerPro General questions
author

Hi
I'm new to this so please forgive the obvious question. I am having a problem connecting to a text file on my web server. I have tested locally and everything is fine however cannot connect through to my shared virtual server.
I have tried to use server.mappath but am pretty sure I have got it wrong please can someone take a look at the following for me.
<%

strConnection = "Provider=MSDataShape;DBQ=Server.MapPath(../private/testrunner.txt);Driver={Microsoft Text Driver (.txt; .csv)};DriverId=27;Extensions=txt,csv,tab,asc;FIL=text;MaxBufferSize=2048;MaxSc

anRows=25;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes

;"

%>
Thanks in advance !
Great programme by the way !

Sergey Kornilov admin 2/5/2005

Richard,
this connection string don't look correct. See my changes in bold:

<%

strConnection = "Provider=MSDataShape;DBQ=" & Server.MapPath("../private/testrunner.txt") & ";Driver={Microsoft Text Driver (.txt; .csv)};DriverId=27;Extensions=txt,csv,tab,asc;FIL=text;MaxBufferSize=2048;MaxSc

anRows=25;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes

;"

%>