[OT] Server 2003 + Access

Discussion in 'ASP General' started by Steven Burn, Feb 4, 2004.

  1. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #1
    1. Advertisements

  2. I've noticed that Server 2003 (IIS6) doesn't seem to support
    database's.....
    Sounds absurd. Could you be more specific? What does "doesn't seem to
    support" mean?
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #2
    1. Advertisements

  3. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #3
  4. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #4
  5. 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/
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #5
  6. Steven Burn

    Evertjan. Guest

    Aaron Bertrand - MVP wrote on 04 feb 2004 in
    microsoft.public.inetserver.asp.general:
    You are right, Aaron.

    My guess is that the db resides in a read only directory.
     
    Evertjan., Feb 4, 2004
    #6
  7. Steven Burn

    Steven Burn Guest

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

    Code (Text):

    <%
    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)
     
    Steven Burn, Feb 4, 2004
    #7
  8. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #8
  9. 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.
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #9
  10. Steven Burn

    Ray at Guest

    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
     
    Ray at, Feb 4, 2004
    #10
  11. Steven Burn

    Steven Burn Guest

    all users (external and internal)

    --
    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)


     
    Steven Burn, Feb 4, 2004
    #11
  12. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #12
  13. Steven Burn

    Evertjan. Guest

    Curt_C [MVP] wrote on 04 feb 2004 in
    microsoft.public.inetserver.asp.general:
    Good questin, Curt.
     
    Evertjan., Feb 4, 2004
    #13
  14. 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
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #14
  15. 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/
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #15
  16. Steven Burn

    Steven Burn Guest

    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)


     
    Steven Burn, Feb 4, 2004
    #16
  17. Steven, cut & paste the code, rather than carelessly transcribe. Then we
    don't waste half an hour chasing red herrings!!!!

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #17
  18. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #18
  19. 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
    are you using option explicit? if so, can you dim these all on one line?
    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.
    bad variable name. This is not a DSN, it is a connection string!
    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.
    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.

    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
    %>
     
    Aaron Bertrand - MVP, Feb 4, 2004
    #19
  20. Steven Burn

    Steven Burn Guest

    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)
     
    Steven Burn, Feb 4, 2004
    #20
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.