• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfexcute

Participant ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

1.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

Where is the file "scorecard_30_import_Saves" located?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 05, 2008 Aug 05, 2008

Copy link to clipboard

Copied

Hi,

Did you encounter any errors?... Have you checked the application logs?...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

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".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

<cfset saves = "Saves">
<cfloop index="i" list="#saves#">
it is saved on my document folder as 'scorecard_30_import_saves'
Still same error...help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

cf_user is a SQL 05 admin user....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 06, 2008 Aug 06, 2008

Copy link to clipboard

Copied

....right....
but can that user access the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

cf_user doesnt exist on windows environment, it is a SQL 05 power user. As I mention, CF and SQL 05 are located on my local machine...

I still dont understand how this thing will work !
I looked at the security of that dtsx file ...That user doesnt exist in the list

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

OK, I guess I need to make myself clearer.

When Coldfusion runs a command via cfexecute, it runs as the user that the Coldfusion service is running as.

To find that out, open up Task Manager and find the coldfusion process. What username is that process running as? Hint: it can't be a SQL Server user.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

I already checked that.. it runs on 'local system account'

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

The error you're getting is still this?
DTSRun: Loading... Error: -2147217900 (80040E14); Provider Error: 14262 (37B6) Error string: The specified DTS Package ('Name = 'C:/Documents and Settings/vozturk/My Documents/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

Since there's a space in the path to that file, you might need to put quotes around it:
<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>

Can you run this command from a dos prompt?
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe /S NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

The run results :
NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

Sorry this is run results:
Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = ''C:/Documents and Settings
/vozturk/My Documents/scorecard_30_import_saves.dtsx''; ID.VersionID = {[not sp
ecified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 07, 2008 Aug 07, 2008

Copy link to clipboard

Copied

This will take forever if I have to ask the same question multiple times:
Can you run this command from a DOS prompt?
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe /S NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008

What is the output of running that command, from the DOS prompt? If it's the same, DTS package does not exist, are you positive you are using the correct filename?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

'scorecard_30_import_saves.dtsx' file name and location is same as above... Yes I am getting the error I am posting...
Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = ''C:/Documents and Settings
/vozturk/My Documents/scorecard_30_import_saves.dtsx''; ID.VersionID = {[not sp
ecified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

Is that the output of running the command from the DOS prompt?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

YES

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

Well then, it has nothing to do with Coldfusion. You need to get that command working in the DOS prompt first. Then, and only then (because you know it's working), you can move it into CF.

A quick google search yields:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2947781&SiteID=1
http://support.microsoft.com/kb/308801
http://www.mydatabasesupport.com/forums/sqlserver-faq/228365-help-dtsrun-dts-package.html
http://support.microsoft.com/kb/299354
http://www.dbforums.com/showthread.php?t=1622934
http://www.developmentnow.com/g/103_2006_9_0_0_827238/DTSrun-gives-Package-does-not-exist-error.htm

I'm not sure what will fix your problem at this point, but based on those links, you might want to just try changing /N to /F and seeing if that takes care of it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

Yes sir

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2008 Aug 08, 2008

Copy link to clipboard

Copied

LATEST
None of the posted links help.. Any way thank you for the help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation