Skip to main content
Inspiring
August 5, 2008
Question

cfexcute

  • August 5, 2008
  • 15 replies
  • 2005 views
The following doesnt copy the data from csv into db table... why? Any help appreciated...My CF and SQL server are on my local machine.
This topic has been closed for replies.

15 replies

emmim44Author
Inspiring
August 6, 2008
Still same error:
<cfset saves = "Saves">
<cfloop index="i" list="#saves#">
<cfscript>
targ = structNew();

targ.Exe = "c:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe";
targ.server = "NYCWSITSSALEEM";
targ.verBase= "30";
</cfscript>

<cfexecute name = "#targ.Exe#"
arguments = "/S #targ.server# /N C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx /U cf_user /P 1 /A DateToUse:8=#DateFormat(now(), 'MM/DD/YYYY')#"
timeOut = "300"><!--- 5 minutes --->
</cfexecute>
</cfloop>
Participating Frequently
August 6, 2008
You also need to be sure that the user that ColdFusion is running under can see that file.

What user is ColdFusion running as? Can that user see that file?
emmim44Author
Inspiring
August 6, 2008
<cfset saves = "Saves">
<cfloop index="i" list="#saves#">
it is saved on my document folder as 'scorecard_30_import_saves'
Still same error...help
Participating Frequently
August 6, 2008
Give it a full path to that file. You also need to be sure that the user that ColdFusion is running under can see that file.
emmim44Author
Inspiring
August 6, 2008
The new error is :
DTSRun: Loading... Error: -2147217900 (80040E14); Provider Error: 14262 (37B6) Error string: The specified DTS Package ('Name = 'scorecard_30_import_Saves'; ID.VersionID = {[not specified]}.{[not specified]}') does not exist. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0
Participating Frequently
August 6, 2008
So I ask again:
Where is the file "scorecard_30_import_Saves" located?

This line of code:
<cfloop index="i" list="Saves">
loops over a list. However, if "Saves" is a variable containing a list, you need to enclose it in pound signs:
<cfloop index="i" list="#Saves#">
Without the pound signs, ColdFusion thinks you're passing the string "Saves" in as the list, which, as a comma-delimited list, only contains one element, "Saves".
Inspiring
August 6, 2008
Hi,

Did you encounter any errors?... Have you checked the application logs?...
Participating Frequently
August 5, 2008
Where is the file "scorecard_30_import_Saves" located?