Forum Home
Press F1
 
Thread ID: 28125 2002-12-11 10:20:00 ASP & Access & Hosting Help!! Erin Salmon (626) Press F1
Post ID Timestamp Content User
105142 2002-12-11 10:20:00 Hi,

I have recently rebuilt myself a new website with the intention of hosting it on my own server on a wireless internet connection with a static IP. With this is mind, I built it using ASPEmail instead of CDONTS, and with and ODBC Connection to access the database.

Now, my wireless connection has been delated significantly, so I decided to move the site to a webhost. I chose www.2day.com for their competitive 2MB ASP plan for $15/month + GST.

However, 2Day.com require me to use something like this for my database connection:

"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source =" & Server.MapPath("\_database\MyDatabase.mdb") & ";" & _
"Jet OLEDB:Database Password =secret;"

I've never used this method before, and I was unable to get it going on PWS (does it perhaps not support it?), and when I used it on the webserver (2day.com), I was unable even to get to the page. The site is supposed to be hosted at:

http://unl9370s1.brahms.2day.com

But that link does not show my page. I suspect that this maybe because I have an error on the page, (to do with the database connection - the site worked fine on PWS), and so the page doesn't load, and rather than giving me an error as it does on PWS, it simply refuses to display the page.

So, how can I get that database connection working, and I assume that the '_' at the end of lines means that the line continues, is that correct?

Also, any ideas on why I can't see the site?

I'm going to try putting a really simple file on as default.asp and see if it works.

:)

Erin
Erin Salmon (626)
105143 2002-12-11 10:25:00 Hi - putting a very simple page up did indeed fix it, so there is nothing wrong with the server/hosting system.

This mean there is an error in my code. Is there someone who would be able to tell me what is wrong with the connection string, as this is essentially the only bit of ASP on the main page.

:)

Erin
Erin Salmon (626)
105144 2002-12-11 11:01:00 Don't know whether it helps much but this is what I got when going there :

Microsoft VBScript runtime error '800a01a8'

Object required: 'Provider=Microsoft.J'

/default.asp, line 7
mikebartnz (21)
105145 2002-12-11 11:15:00 I've got a funny feeling that it should be Server.MapPath("/_database/MyDatabase.mdb")

as in / instead of \

Also W3Schools (www.w3schools.com) have some very good asp tutorials.
-=JM=- (16)
105146 2002-12-11 18:10:00 Hey
Try this:


Dim oConn, sConnString
Set oConn = Server.CreateObject("ADODB.Connection")
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("\path\dbname.mdb") & ";"
oConn.Open(sConnString)


and replace "path" with the path to your database, and "dbname.mdb" with your database name and it's mdb suffix


CyberChuck
cyberchuck (173)
105147 2002-12-11 21:15:00 Hi,

It's interesting that Mike sees that error, because it's the same error I get on PWS. That means that PWS can at least handle the code...

I'll try using the / \'s the other way around, and I'll try the completely different method.

Back soon,

:)

Erin
Erin Salmon (626)
105148 2002-12-11 21:21:00 Hi again,

The \ trick didn't work, and the new method (having figured out what it does), still uses the ODBC connection on the server, which I can't use.

This "Object Required" error is something I've seen before, but I don't remember what the problem was...

Also, the fact that it indicates that the line:

Object required: 'Provider=Microsoft.J'

Is the problem. There is something wrong with the beginning of the line...

:)

Erin
Erin Salmon (626)
105149 2002-12-11 21:31:00 Hi,

Best place to ask asp questions is: mail.2day.com
Heather P (163)
105150 2002-12-11 21:45:00 You need to assign all that database connection code to an object (variable) - otherwise how can you access it?

So:
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;" &_
etc.

See here (www.learnasp.com) for more.
antmannz (28)
105151 2002-12-11 21:46:00 Hi,

I grabbed another connection method off that forum, but after a little tinkering, ended up again with:

Microsoft VBScript runtime error '800a01a8'

Object required: 'PROVIDER=MICROSOFT . J'

/unleash/Default . asp, line 9

Just the same as the last error - what am I doing wrong?

This connection string works like this:

Connect="PROVIDER=MICROSOFT . JET . OLEDB . 4 . 0;DATA SOURCE="
Connect=Connect&Server . MapPath("\_database\parts1 . mdb")
Connect=Connect&";Jet OLEDB:Database Password=Idonotthinkso;"

:)

Erin
Erin Salmon (626)
1 2