Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot connect to remote database through ASP

Status
Not open for further replies.

Gameboy9

Programmer
Jun 8, 2001
39
0
0
US
I'll show you the code that I'm using, then I'll give you the error.

This is process.asp here.

<% Language=VBScript %>
<% Response.Buffer = True %>
<!-- #include file=&quot;jobinclude.asp&quot; -->
<!-- #include file=&quot;officeinclude.asp&quot; -->
<%
Dim objConn, objJob, strJob
Set fdfacx = Server.CreateObject(&quot;Fdfapp.fdfapp&quot;)
Set fdfNew = fdfacx.FDFCreate
strJob = request.querystring(&quot;job&quot;)
blnValid = JobValidity(strjob)
...
%>

-------------------------

This is jobinclude.asp

<%
Function JobQuery(strJob)
Set objConn = CreateObject(&quot;ADODB.Connection&quot;)
objConn.ConnectionString =
&quot;Provider=MSDASQL.1;Persist Security
Info=False;Extended Properties=&quot;&quot;Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=\\fshv5\vol2\SOFTWARE\Mars\tlmarcor.dbc;SourceType=DBC;Exclusive=No;Back
groundFetch=No;Collate=Machine;Null=Yes;Deleted=Yes;&quot;&q
uot;&quot;
objConn.Open
Set objJob = CreateObject(&quot;ADODB.Recordset&quot;)
Set objJob.ActiveConnection = objConn2
strQuery = &quot;SELECT custname FROM jobs WHERE job
= '&quot; & Trim(strjob) & &quot;'&quot;
objJob.Open strQuery
JobQuery = objJob
End Function

Function JobValidity(strJob)
objQuery = JobQuery(strJob)
If objQuery.BOF = True and objQuery.EOF = True Then
JobValidity = False
else
JobValidity = True
End If
End Function

...

%>

---------------------------

And here's the error I get.

[Microsoft][ODBC Visual FoxPro Driver]Cannot open file \\fshv5\vol2\SOFTWARE\Mars\tlmarcor.dbc

---------------------------

Strange thing is... it works perfectly in ColdFusion or even a DLL file on the server. So why does this one fail? Do I have to move the include file off the server - which seems like something I can't do? (Connecting remotely or saving in the directories of the server is things I can't seem to do for some reason... works anywhere else on the hard drive)

Thanks for any help that you may have.

 
Do you have the correct permissions on the \\fshv5 server? The anonymous user IUSR_MACHINENAME needs read (at least) permissions to the directory and the file on the \\fshv5 server.
 
It seemed like giving IUSR_WEBSERVER - the name I think you're referring to - WEBSERVER being the computer name of the IIS(Windows NT) server - read rights did not work - same error.

I should point out that this database is on a novell netware server. We're also using IIS 4.0.
 
[neutral] I have similar problem with Gameboy9 and I already did what sobesoft instructions and the solution of Microsoft (ID:Q178045 HOWTO: Configure ASP to Read Data File on a Novell Server).

Please help us [sadeyes]..... thanks
 
Check the faq's for data access. I recommend using a system DSN. Try a simple pull first, troubleshoot that. To check that it is not a permission issue (iusr_machine), change the page properties to not allow anon access, only challenge/response, visit the page and log on as admin. If you can access the data, then you have a permissions issue.
Jonathan Galpin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top