December 1, 2006 at 8:11 am
I am executing a stored procedure on the server that i access through tcp/ip
I put some text files there though ftp and am loading them in the database:
BULK INSERT #textfile FROM 'D:\websites\neolane\www\Import\init_tv.txt'
(this is the path on the server and it worls perfectly well)
but when i try:
EXEC xp_fileexist 'D:\websites\neolane\www\Import\init_tv.txt'
i have that the file is not found!! how come?
December 1, 2006 at 9:03 am
Can we see the exact code you are using for xp_fileexists?
December 1, 2006 at 9:19 am
well it's what i already wrote... and i am executing it on the db on the server and i get 0
declare @result int
EXEC xp_fileexist 'D:\websites\neolane\www\Import\init_tv.txt' , @result output
print @result
however i try it on my local db and on i file on mu c: .... it worked of course...
Weird how i can import a file while the function says it doesnt exist
December 1, 2006 at 9:27 am
Probabely because the bulk insert is executed in a different context. That's the only explenation I can give. However it's only a hunch and I have no proof to back it up.
Anyone?
December 6, 2006 at 2:52 am
anyone? any clue??
December 6, 2006 at 3:46 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply