Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-30-2006, 05:59 AM   PM User | #1
pedroponting
New Coder

 
Join Date: Mar 2006
Location: Australia
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
pedroponting is an unknown quantity at this point
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:

Quote:
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:

Quote:
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)
pedroponting is offline   Reply With Quote
Old 03-30-2006, 06:32 AM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,042
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
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
oracleguy is offline   Reply With Quote
Old 03-30-2006, 02:45 PM   PM User | #3
BaldEagle
Regular Coder

 
Join Date: Apr 2005
Location: Lisbon, CT
Posts: 339
Thanks: 0
Thanked 0 Times in 0 Posts
BaldEagle is an unknown quantity at this point
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
BaldEagle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:32 AM.


Advertisement
Log in to turn off these ads.