p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: RE: HELP ME!!!!!!!!!!!!!! PLEASE


Message #1 by "Drew, Ron" <RDrew@B...> on Thu, 13 Jun 2002 07:59:34 -0400
How is G mapped on the other clients?  Is it part of a scriptlogic
signon setup?
If the server has a DSName, try using it versus the G.
Try using MapPath (notice the / goes the other way for mappath...
...MS Access
It should look like this if you want to use OLEDB (which is
recommended):

sConnection =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
              "Data Source=3DC:\somepath\mydb.mdb;" & _
              "User Id=3Dadmin;" & _
              "Password=3D;"


You may need to use Server.MapPath(FileName) to translate the virtual
path
to a real path, if you use an ISP and don't know the physical location
of
the database:

sConnection =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
              "Data Source=3D" & Server.MapPath("/somepath/mydb.mdb") &
";" & _
              "User Id=3Dadmin;" & _
              "Password=3D;"

If all else fails, comment out the lookup and replace it with
Dim Testvar
Testvar =3D Server.MapPath("G:\Intranet\Test.mdb")
Response.write Testvar



-----Original Message-----
From: kev_web25@b... [mailto:kev_web25@b...]
Sent: Thursday, June 13, 2002 7:42 AM
To: ASP Databases
Subject: [asp_databases] HELP ME!!!!!!!!!!!!!! PLEASE


Quite an annoying problem...

Situation : Running a Win2k Server with IIS 5.0. Created a new web site
from within IIS called 'Intranet', with the home directory set to the
local G:\ drive and a folder called 'Intranet'. In this folder there are

two files, a 'test.mdb' Access 2000 database and a 'default.asp' file.
Here is the contents of the default.asp file -

<% @language=3D"vbscript" %>
<!-- metadata type=3D"typelib" file=3D"C:\Program Files\Common
Files\System\Ado\Msado15.dll" -->
<HTML>
<HEAD>
<TITLE>Test Data Access Page</TITLE>
<BODY>
<%
	Dim cn, rs
=09
	cn =3D "Provider=3DMicrosoft.Jet.OLEDB.4.0;" &_
             "Data Source=3DG:\Intranet\Test.mdb"

	Set rs =3D Server.CreateObject("ADODB.Recordset")

	rs.Open "tblTest", cn, adOpenForwardOnly, adLockReadOnly,
adCmdTable

	Do While rs.EOF =3D False
		Response.Write rs("Forename") & " " & rs("Surname")
		rs.MoveNext
	Loop
%>
</BODY>
</HTML>

When i load this page up on the server machine, i get a full list of
names
obtained from the recordset 'tblTest', however when i try accessing the
page on another client machine - tried machines running 98, 2k and XP -
i
get the error code 0x80004005 and an Unspecified Error message.

I have tried setting the machines unauthorised access user name to the
administrator, and also tried setting it to a new account called
Intranet,
where the user has ALL permissions but this still doesn't work....

I don't know what else to try, please help...

Oh yeah, we also have a domain name 'intranet' which redirects to the
server computer and is registered in the DNS as a CNAME entry..

If you could help in any way, i would be exremely grateful. If you don't

understand some of the above, or if i haven't made it very clear, please

let me know.

Thank you

Kevin
Message #2 by kev_web25@b... on Thu, 13 Jun 2002 11:41:49
Quite an annoying problem...

Situation : Running a Win2k Server with IIS 5.0. Created a new web site 
from within IIS called 'Intranet', with the home directory set to the 
local G:\ drive and a folder called 'Intranet'. In this folder there are 
two files, a 'test.mdb' Access 2000 database and a 'default.asp' file. 
Here is the contents of the default.asp file - 

<% @language="vbscript" %>
<!-- metadata type="typelib" file="C:\Program Files\Common 
Files\System\Ado\Msado15.dll" -->
<HTML>
<HEAD>
<TITLE>Test Data Access Page</TITLE>
<BODY>
<%
	Dim cn, rs
	
	cn = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
             "Data Source=G:\Intranet\Test.mdb"

	Set rs = Server.CreateObject("ADODB.Recordset")

	rs.Open "tblTest", cn, adOpenForwardOnly, adLockReadOnly, 
adCmdTable

	Do While rs.EOF = False
		Response.Write rs("Forename") & " " & rs("Surname")
		rs.MoveNext
	Loop
%>
</BODY>
</HTML>

When i load this page up on the server machine, i get a full list of names 
obtained from the recordset 'tblTest', however when i try accessing the 
page on another client machine - tried machines running 98, 2k and XP - i 
get the error code 0x80004005 and an Unspecified Error message.

I have tried setting the machines unauthorised access user name to the 
administrator, and also tried setting it to a new account called Intranet, 
where the user has ALL permissions but this still doesn't work....

I don't know what else to try, please help...

Oh yeah, we also have a domain name 'intranet' which redirects to the 
server computer and is registered in the DNS as a CNAME entry..

If you could help in any way, i would be exremely grateful. If you don't 
understand some of the above, or if i haven't made it very clear, please 
let me know.

Thank you

Kevin

  Return to Index