dbTalk Databases Forums  

VBScript: OpenTextFile - Permission denied

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss VBScript: OpenTextFile - Permission denied in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bodo v. Ulmenstein
 
Posts: n/a

Default VBScript: OpenTextFile - Permission denied - 04-02-2004 , 04:42 AM






Hi,

In a vbscript I attempt to concatenate textfiles:

....
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder( VKFolder )
For Each tFil In fld.Files
If Left(tFil.Name, 8) = "VERKAUF_" Then
fso.OpenTextFile(VKFolder + "\" + VKFileGesamt,
ForAppending).Write(.OpenTextFile
(tFil.Path,ForReading ).ReadAll)
Next
....

When I execute the vbscript-step only from the package I
get this error:
Error Description: Error code: 0
Error source: Runtime error in Microsoft vbscript
Error description: Permission denied

The properties close connection is set for datapump tasks
in that DTS.

I made sure that the privileges for the folder/files are
set to full-access.

Any ideas how to troubleshoot?

Thanks in advance
Bodo



Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: VBScript: OpenTextFile - Permission denied - 04-02-2004 , 10:39 AM






If the permissions are correct, you can also get the error
if someone or another process has the file open when you try
to open it using FileSystmObject.

-Sue

On Fri, 2 Apr 2004 01:42:18 -0800, "Bodo v. Ulmenstein"
<anonymous (AT) discussions (DOT) microsoft.com> wrote:

Quote:
Hi,

In a vbscript I attempt to concatenate textfiles:

...
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder( VKFolder )
For Each tFil In fld.Files
If Left(tFil.Name, 8) = "VERKAUF_" Then
fso.OpenTextFile(VKFolder + "\" + VKFileGesamt,
ForAppending).Write(.OpenTextFile
(tFil.Path,ForReading ).ReadAll)
Next
...

When I execute the vbscript-step only from the package I
get this error:
Error Description: Error code: 0
Error source: Runtime error in Microsoft vbscript
Error description: Permission denied

The properties close connection is set for datapump tasks
in that DTS.

I made sure that the privileges for the folder/files are
set to full-access.

Any ideas how to troubleshoot?

Thanks in advance
Bodo



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.