dbTalk Databases Forums  

"Path Not Found" woes

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


Discuss "Path Not Found" woes in the microsoft.public.sqlserver.dts forum.



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

Default "Path Not Found" woes - 08-10-2003 , 03:57 PM






Hi,
I'm trying to access a file from our shared SQL Server to our shared
Web Server using a DTS Package. It's failing at the FileSystemObject
here:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "\\webb18\c$\inetpub\brewandvine\images\log.tx t"
'
' Check to see if a log file exists if it does open it. If not create
it.
'
If not objFSO.FileExists(strLogFile) then <--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
End if
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''
I'm using a UNC path our host gave me...Anyone know of anything that
could be causing the error?

TIA,
~Gordon

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: "Path Not Found" woes - 08-10-2003 , 04:25 PM






In article <54cdjvs2hoj7il4gbavftskdaidleabc5o (AT) 4ax (DOT) com>, Simple Simon
<reply (AT) newsgroup (DOT) only> writes
Quote:
Hi,
I'm trying to access a file from our shared SQL Server to our shared
Web Server using a DTS Package. It's failing at the FileSystemObject
here:
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "\\webb18\c$\inetpub\brewandvine\images\log.tx t"
'
' Check to see if a log file exists if it does open it. If not create
it.
'
If not objFSO.FileExists(strLogFile) then <--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
End if
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
I'm using a UNC path our host gave me...Anyone know of anything that
could be causing the error?

TIA,
~Gordon
Does it actually error?

Doing a simple test with like oFSO.FileExists(sFilename) will return
false if the file does not exist, or if there are no permissions on the
share, or even if the machine does not exist, but none of these
scenarios gives me an error.

If you are not getting an error, but the FileExists function returns
false then it implies the file really doesn't exist, or more likely you
have the wrong machine or insufficient permissions on the share. The c$
share is reserved for machine administrators only, so you may not be an
admin on the web server, even if you are on the SQL server.
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




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

Default Re: "Path Not Found" woes - 08-10-2003 , 04:35 PM



First thoughts are that whilst it is good to see you using UNC paths I note that you have chosen an admin share.

"\\webb18\c$\inetpub\brewandvine\images\log.tx t"


I tested the following and it works for me so I would try reworking the file location to not use the Amdin share


Function Main()
dim objFSO, strLogFile, master
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "c:\log.txt"
'
' Check to see if a log file exists if it does open it. If not create it.'
If not objFSO.FileExists(strLogFile) then '<--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " & now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " & now
End if

master.close
set master = nothing
set objFSO = Nothing

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

Reply With Quote
  #4  
Old   
Simple Simon
 
Posts: n/a

Default Re: "Path Not Found" woes - 08-10-2003 , 05:12 PM



Hey Darren!
Thxs for the reply...Jeez, r u always on here? LOL I checked with my
host and they said it aint gonna happen because of permissions across
the network

~Gordon

On Sun, 10 Aug 2003 22:25:40 +0100, Darren Green
<darren.green (AT) reply-to-newsgroup-only (DOT) uk.com> wrote:

Quote:
In article <54cdjvs2hoj7il4gbavftskdaidleabc5o (AT) 4ax (DOT) com>, Simple Simon
reply (AT) newsgroup (DOT) only> writes
Hi,
I'm trying to access a file from our shared SQL Server to our shared
Web Server using a DTS Package. It's failing at the FileSystemObject
here:
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "\\webb18\c$\inetpub\brewandvine\images\log.tx t"
'
' Check to see if a log file exists if it does open it. If not create
it.
'
If not objFSO.FileExists(strLogFile) then <--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
End if
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
I'm using a UNC path our host gave me...Anyone know of anything that
could be causing the error?

TIA,
~Gordon

Does it actually error?

Doing a simple test with like oFSO.FileExists(sFilename) will return
false if the file does not exist, or if there are no permissions on the
share, or even if the machine does not exist, but none of these
scenarios gives me an error.

If you are not getting an error, but the FileExists function returns
false then it implies the file really doesn't exist, or more likely you
have the wrong machine or insufficient permissions on the share. The c$
share is reserved for machine administrators only, so you may not be an
admin on the web server, even if you are on the SQL server.


Reply With Quote
  #5  
Old   
Simple Simon
 
Posts: n/a

Default Re: "Path Not Found" woes - 08-10-2003 , 05:14 PM



Thxs for the reply Allan,
I believe its a permission thingy...I probably dont have permission to
go thru the network on our host...darn!

~Gordon

On Sun, 10 Aug 2003 21:35:05 GMT, "Allan Mitchell"
<allan (AT) no-spam (DOT) sqldts.com> wrote:

Quote:
First thoughts are that whilst it is good to see you using UNC paths I note that you have chosen an admin share.

"\\webb18\c$\inetpub\brewandvine\images\log.tx t"


I tested the following and it works for me so I would try reworking the file location to not use the Amdin share


Function Main()
dim objFSO, strLogFile, master
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "c:\log.txt"
'
' Check to see if a log file exists if it does open it. If not create it.'
If not objFSO.FileExists(strLogFile) then '<--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " & now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " & now
End if

master.close
set master = nothing
set objFSO = Nothing

Main = DTSTaskExecResult_Success
End Function


Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: "Path Not Found" woes - 08-11-2003 , 04:26 AM



You could maybe use an ActiveX Script task to request the file via Http from
the web server and write it to disk on the SQL Server ready for import.


--
Darren Green
http://www.sqldts.com

"Simple Simon" <reply (AT) newsgroup (DOT) only> wrote

Quote:
Hey Darren!
Thxs for the reply...Jeez, r u always on here? LOL I checked with my
host and they said it aint gonna happen because of permissions across
the network

~Gordon

On Sun, 10 Aug 2003 22:25:40 +0100, Darren Green
darren.green (AT) reply-to-newsgroup-only (DOT) uk.com> wrote:

In article <54cdjvs2hoj7il4gbavftskdaidleabc5o (AT) 4ax (DOT) com>, Simple Simon
reply (AT) newsgroup (DOT) only> writes
Hi,
I'm trying to access a file from our shared SQL Server to our shared
Web Server using a DTS Package. It's failing at the FileSystemObject
here:
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
Set objFSO = CreateObject("Scripting.FileSystemObject")
strLogFile = "\\webb18\c$\inetpub\brewandvine\images\log.tx t"
'
' Check to see if a log file exists if it does open it. If not create
it.
'
If not objFSO.FileExists(strLogFile) then <--------Path Not Found
Set master = objfso.CreateTextFile(strLogFile)
master.WriteLine "File Created @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
Else
Set master = objFSO.OpenTextFile(strLogFile,8)
master.WriteLine
master.WriteLine "File Opened @ " & now
master.WriteLine " In LAST File Exists Routine @ " &
now
End if
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''
I'm using a UNC path our host gave me...Anyone know of anything that
could be causing the error?

TIA,
~Gordon

Does it actually error?

Doing a simple test with like oFSO.FileExists(sFilename) will return
false if the file does not exist, or if there are no permissions on the
share, or even if the machine does not exist, but none of these
scenarios gives me an error.

If you are not getting an error, but the FileExists function returns
false then it implies the file really doesn't exist, or more likely you
have the wrong machine or insufficient permissions on the share. The c$
share is reserved for machine administrators only, so you may not be an
admin on the web server, even if you are on the SQL server.




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.