>>>function CreateCSV() >>> >>>use c:\inetpub\wwwroot\aspxtest\app_data\library3 >>>*set safety off >>>*set talk off >>>*set console off >>>*set alternate to c:\inetpub\wwwroot\aspxtest\app_data\PAGLibrary.txt >>>*set alternate on >>>*scan >>>*? library3.title >>>*endscan >>>*set alternate off >>>*set alternate to >>>*set safety on >>>*set talk on >>>*set console on >>>use >>>endfunc>>>Which runs OK. But if I uncomment the print line it fails. My original code was
>>>function CreateCSV() >>> >>>use c:\inetpub\wwwroot\aspxtest\app_data\library3 >>>set safety off >>>copy to c:\inetpub\wwwroot\aspxtest\app_data\tempfile type csv >>>set safety on >>>use >>>endfuncWhich also failed. Error in both cases is "Feature not available". Note that I have used the full path to ensure that it is going to a folder with correct permissions and that the user (me) has no problems reading and writing to other files in this folder. Of additional interest is the fact that if I omit the TYPE clause from the COPY TO command it will work just fine. So apparently it is the TYPE clause that is causing the problem.
>>>>> >>>>>Dim oConnVFP As New Data.OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("VFPLibrary").ConnectionString) >>>>>Dim objCommandCSV As New System.Data.OleDb.OleDbCommand("do createCSV", oConnVFP) >>>>> >>>>>objCommandCSV.CommandType = Data.CommandType.StoredProcedure >>>>> >>>>>oConnVFP.Open() >>>>>objCommandCSV.ExecuteNonQuery() >>>>>oConnVFP.Close() >>>>>>>>>>But this doesn't work. Thanks