[OT] Server 2003 + Access

S

Steven Burn

I know this is OT but, I don't have the energy to subscribe to the Server
2003 NG's just to ask a simple Q.

I've noticed that Server 2003 (IIS6) doesn't seem to support database's.....
anyone know anything about this?

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
A

Aaron Bertrand - MVP

I've noticed that Server 2003 (IIS6) doesn't seem to support
database's.....
anyone know anything about this?

Sounds absurd. Could you be more specific? What does "doesn't seem to
support" mean?
 
S

Steven Burn

I got a sub-domain with my host and tried to use ASP/VBScript with an Access
DB and the site just wouldn't actually "do anything" until I removed the
code that loaded/accessed the DB..... once the DB side of it was removed,
the site loaded without any problems.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
S

Steven Burn

I should probably have added, the DB and VBScript etc etc, code, works
absolutely fine on the server running Windows 2000

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
A

Aaron Bertrand - MVP

Show your code, explain the directory structure, etc.

Windows Server 2003 certainly does support databases. Why on earth do you
think they would stop? This is a code issue or a configuration issue.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
 
E

Evertjan.

Aaron Bertrand - MVP wrote on 04 feb 2004 in
microsoft.public.inetserver.asp.general:
Show your code, explain the directory structure, etc.

Windows Server 2003 certainly does support databases. Why on earth do
you think they would stop? This is a code issue or a configuration
issue.

You are right, Aaron.

My guess is that the db resides in a read only directory.
 
S

Steven Burn

The following is the code I am using to open the DB;

Code:
<%
Response.AddHeader "Cache-Control", "private"
Response.ExpiresAbsolute=DateAdd("yyyy", -10, Date)
Response.AddHeader "pragma" , "no-cache"
Response.Buffer = True
%>

<!--Open Database-->
<%
set conn = server.createobject("adodb.connection")
Dim FSO
Dim fldr, path
path = FSO.GetFolder(Server.MapPath("./")) ' ./ is the current folder

DsnAccess = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& path &
"dmain.mdb" 'database name
conn.open DsnAccess
set rs = server.createobject ("adodb.recordset")

Set FSO = Nothing
Set fldr = Nothing
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
S

Steven Burn

I've already checked that. All folders have full read/write access

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
A

Aaron Bertrand - MVP

path = FSO.GetFolder(Server.MapPath("./")) ' ./ is the current folder

What is FSO? If this is supposed to be an object, you forgot to create it.
I see a half dozen other potential problems in the code, but let's start
there.
 
R

Ray at

What about the code that executes your query and returns the results? This
code below won't really show you anything. Is there an rs.Open or a Set rs
= line anywhere and then a corresponding response.write rs(0) line?

Ray at work
 
S

Steven Burn

No.. FSO is being created, I just forgot to type it in when I posted the
code :eek:\

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
A

Aaron Bertrand - MVP

I think this is a cut & paste of PART of the code he is running. As is, the
code wouldn't even get to a point where it could spin and not return,
because FSO is required.

Microsoft VBScript runtime error '800a01a8'
Object required: ''
/MrBurn.asp, line 13
 
A

Aaron Bertrand - MVP

Is IUSR_machineName explicitly listed?

Can you show us the real, full version of the code? As I noted elsewhere,
the parser barfs on the code you posted before it even attempts to run any
ASP code.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
 
S

Steven Burn

No specific error messages, it was just acting as if the site wasn't
actually there (if that makes sense?). I don't have direct access to IIS
myself, so can't provide any server error messages (assuming they are
actually logged) or anything.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Curt_C said:
Is there an error message?


--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


Steven Burn said:
The following is the code I am using to open the DB;

Code:
<%
Response.AddHeader "Cache-Control", "private"
Response.ExpiresAbsolute=DateAdd("yyyy", -10, Date)
Response.AddHeader "pragma" , "no-cache"
Response.Buffer = True
%>

<!--Open Database-->
<%
set conn = server.createobject("adodb.connection")
Dim FSO
Dim fldr, path
path = FSO.GetFolder(Server.MapPath("./")) ' ./ is the current folder

DsnAccess = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& path &
"dmain.mdb" 'database name
conn.open DsnAccess
set rs = server.createobject ("adodb.recordset")

Set FSO = Nothing
Set fldr = Nothing
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Aaron Bertrand - MVP said:
Show your code, explain the directory structure, etc.

Windows Server 2003 certainly does support databases. Why on earth do you
think they would stop? This is a code issue or a configuration issue.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




I got a sub-domain with my host and tried to use ASP/VBScript with an
Access
DB and the site just wouldn't actually "do anything" until I removed the
code that loaded/accessed the DB..... once the DB side of it was removed,
the site loaded without any problems.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


I've noticed that Server 2003 (IIS6) doesn't seem to support
database's.....
anyone know anything about this?

Sounds absurd. Could you be more specific? What does "doesn't
seem
to
support" mean?
 
S

Steven Burn

I've just called my host to ask about the IUSR_machinename question.......
as for the full DB open code, it's below.

<%
Response.AddHeader "Cache-Control", "private"
Response.ExpiresAbsolute=DateAdd("yyyy", -10, Date)
Response.AddHeader "pragma" , "no-cahce"
Response.Buffer = True
%>

<!--DatabaseOpen Is Here-->
<%
if StrForumStatus = 2 then
response.redirect ("Default.asp")
end if
set conn = server.createobject("adodb.connection")
Dim FSO
Dim fldr
Dim path

Set FSO = CreateObject("Scripting.FileSystemObject")
Set fldr = FSO.GetFolder(Server.MapPath("./"))

If fldr.name = "admin" then 'if accessing the admin area
Set fldr = FSO.GetFolder(Server.MapPath("../"))
path = Server.MapPath("\users\" & fldr.name & "\dmain.mdb")
Else
path = Server.MapPath("\users\" & fldr.name & "\dmain.mdb")
End if
DsnAccess = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& path
conn.open DsnAccess
set rs = server.createobject ("adodb.recordset")

Set FSO = Nothing
Set fldr = Nothing
%>


--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
A

Aaron Bertrand - MVP

First off, it might be the FSO (see http://www.aspfaq.com/2180).

Some other comments on your code:

don't need server prefix here
set conn = server.createobject("adodb.connection")

are you using option explicit? if so, can you dim these all on one line?
Dim FSO
Dim fldr, path

why do you need FSO for this? Also note that GetFolder returns an object,
not a string, so stuffing path into a connection string later is not a grand
idea.
path = FSO.GetFolder(Server.MapPath("./")) ' ./ is the current folder

bad variable name. This is not a DSN, it is a connection string!
DsnAccess = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& path &
"dmain.mdb" 'database name
conn.open DsnAccess

Why do you need a recordset object? Please see http://www.aspfaq.com/2191
.... also your code doesn't even do anything with whatever data you intended
to pull.
set rs = server.createobject ("adodb.recordset")
Set FSO = Nothing

Please make sure you close and set to nothing all objects you actually
create. I have no idea what fldr is or where you created it, or if it even
needs to be destroyed.
Set fldr = Nothing
%>


Here is my suggestion:

<%
' cache-busting code from http://aspfaq.com/2022

pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr

set conn = CreateObject("ADODB.Connection")

db = Server.MapPath("dmain.mdb")

connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
conn.open connstr

' assume you do something with conn here?

conn.close
set conn = nothing
%>
 
S

Steven Burn

Just had a reply from my host........ IUSR wasn't apparently "explicitly"
listed with full read/write access..... now is and all is working perfectly
(just wishing I'd checked earlier).

Apologies for wasting everyone's time......

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

[Perhaps OT] Zip 2
Replace Function 6
OT - Microsoft using Linux???? 1
[OT - sorta, maybe?] SQL alternatives 13
Block "HEAD" method? 2
OT - sending HTML email 2
IIS 4
Just wondering 11

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top