Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2006
    Location
    Australia
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    server side newbie database path query

    Ok so I'm brand new to server-side development. I have implemented a simple asp script which posts data from a form to a database and displays the data in a table on my site. Works fine and dandy on my development server, but falls over on the real thing. The display of data works fine but not the "insert into" SQL statement. I asked the webhost guy to set appropriate writer permissions on the database, thinking this was the problem. He got back to me with this:

    There was no 'global.asa' file indicating the EXACT RELATIVE database location on the 'Virtual Root' path!

    For the asp database connection code to work this is a must.

    The connection strings in the 'message_send.asp' file will not work on this server (I'm surprised they worked at all) as you need a global.asa file which does all of this for you.
    What's all this then? My script says this:

    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open(Server.Mappath("data/kidsdata.mdb"))
    Doesn't that define the path to the data?? I thought 'global.asa' was an optional thing. Looking in the global.asa script, it all appears to be FrontPage stuff, which I thought was irrelevant since I am coding 'by hand' rather than using in-built FP features.

    Can someone explain this to me?
    pp
    -------------------------------------
    "Laziness is the mother of invention" - Thomas Edison (not really)

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    I haven't done a lot of ASP work in a while but as far as I remember, what he is saying isn't exactly accurate.

    How are you opening the connection on the page that works, that displays the data? Is that the same?
    OracleGuy

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just to add to what oracleguy has already stated, I use dsn-less connections all the time and have never, ever used a global.asa file. If you can display data that means the connection was made. However, as you originally thought it seems to be a permissions problem since it burps on a write operaton. I would opt for another help message and hope you get someone else or a phone call if that is possible.

    BaldEagle


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •