import file on network share,but access denied.. -
12-05-2005
, 10:24 AM
hello!
I have a question about importing file on network share but access
denied.
First of all,let me introduce my working environment and setting.
I have a web-based system coded by ASP+MS SQL.
AP server(IIS) and DB server are different machines.
Now I have to do an importing function.
Users will upload their EXCEL to AP server and I'll call stored
procedure in ASP to execute DTS.
After importing EXCEL,I'll produce a ImpLog on AP Server and users can
download.
My sp uses LoadFromServer and Trusted Connection to call DTS.
And my DTS inside also use Trusted Connection to set up all data source
connection.
When I execute DTS from DTS designer
It's OK to have import file source like
"\\APServer\WorkingArea\AAA.xls"
(APServer 's WorkingArea is set to be accessed by Everyone(Right:read))
But if I run DTS from sp,it'll say Microsoft Jet database engine cannot
open the file.blah..blah..
I've google about this FAQ and get an answer about setting SQL Server
Agent's account.
In FAQ,most of the problems are from executing DTS by "Scheduler" and
that's why they
have to set SQL Server Agent's account, isn't it?
But in my situation,I don't have to schedule my DTS and SQL Server
Agent even stops.
So...how can I solve this problem?
I'm not sure if I change the account of executing SQL Server works or
not.
It might be the last thing I want to try because in this system,we use
a lot of DLLs to call DB and
I'm not sure if it'll affect DLLs.
My friend suggests me to use "CreateProcessTask" to XCOPY AP Server's
EXCEL to DB Server.
I just tried that but it told me "return code=4 is not matching
SuccessReturnCode"
I cannot find return code's meaning in google..
So...is there any good idea about solving my problem?
Thanks a lot!!!! |