dbTalk Databases Forums  

Opening an export file gives an error

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


Discuss Opening an export file gives an error in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
branka
 
Posts: n/a

Default Opening an export file gives an error - 10-09-2003 , 04:54 PM






I am exporting my data to a .txt file, and then trying to
run VBScript that would open that file and read it. VB
script works great outside the DTS if I have the file
created. When I run it in DTS it gives me the following
error "Permission Denied". Do I have to do anything
special??? The .txt file is in the correct location and
there.

I am using MSSLQ7.

Thanks,
BB

Reply With Quote
  #2  
Old   
branka
 
Posts: n/a

Default Opening an export file gives an error - 10-09-2003 , 05:13 PM






I forgot to add - i have a VB script run either on
completion or success of export.. this is all done via
the designer.

thanks,
branka


Quote:
-----Original Message-----
I am exporting my data to a .txt file, and then trying to
run VBScript that would open that file and read it. VB
script works great outside the DTS if I have the file
created. When I run it in DTS it gives me the following
error "Permission Denied". Do I have to do anything
special??? The .txt file is in the correct location and
there.

I am using MSSLQ7.

Thanks,
BB
.


Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Opening an export file gives an error - 10-10-2003 , 12:34 AM



I do not know what script you are running to execute against the file but
here is mine.

In the Workflow properties of the datapump task I have "Close Connection On
Completion" set.

Here is my script


Function Main()

DIM fso
DIM tStream
DIM strOutput


SET fso = CREATEOBJECT("Scripting.FileSystemObject")

IF fso.FileExists("c:\DelMeAfterThis.txt") THEN
Msgbox "File Exists"
SET tStream = fso.OpenTextFile("c:\DelMeAfterThis.txt",1)
msgbox "File open"
strOutput = tStream.ReadLine
msgbox strOutput
ELSE
Msgbox "File Not There"
END IF


Main = DTSTaskExecResult_Success
End Function

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"branka" <B (AT) nomail (DOT) com> wrote

Quote:
I am exporting my data to a .txt file, and then trying to
run VBScript that would open that file and read it. VB
script works great outside the DTS if I have the file
created. When I run it in DTS it gives me the following
error "Permission Denied". Do I have to do anything
special??? The .txt file is in the correct location and
there.

I am using MSSLQ7.

Thanks,
BB



Reply With Quote
  #4  
Old   
branka
 
Posts: n/a

Default Re: Opening an export file gives an error - 10-10-2003 , 12:31 PM



Thank you tons! You made my day.

I wasn't clositng the connection (had no clue i had to do
that).

Branka


Quote:
-----Original Message-----
I do not know what script you are running to execute
against the file but
here is mine.

In the Workflow properties of the datapump task I
have "Close Connection On
Completion" set.

Here is my script


Function Main()

DIM fso
DIM tStream
DIM strOutput


SET fso = CREATEOBJECT("Scripting.FileSystemObject")

IF fso.FileExists("c:\DelMeAfterThis.txt") THEN
Msgbox "File Exists"
SET tStream = fso.OpenTextFile("c:\DelMeAfterThis.txt",1)
msgbox "File open"
strOutput = tStream.ReadLine
msgbox strOutput
ELSE
Msgbox "File Not There"
END IF


Main = DTSTaskExecResult_Success
End Function

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"branka" <B (AT) nomail (DOT) com> wrote in message
news:05ef01c38eaf$fb6f1d10$a401280a (AT) phx (DOT) gbl...
I am exporting my data to a .txt file, and then trying
to
run VBScript that would open that file and read it. VB
script works great outside the DTS if I have the file
created. When I run it in DTS it gives me the following
error "Permission Denied". Do I have to do anything
special??? The .txt file is in the correct location and
there.

I am using MSSLQ7.

Thanks,
BB


.


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.