Hello everyone, I am about to pull my hair out. I have a database, I have a register.asp and a login.asp page. They work fine on my old site which is hosted at me regular hoster. Now I took over a new site. I mimic'd the database and site and such for this new site (except for the database and table names) and I cannot connect to database. When I ftp up to the site the first thing I see are three folders one is db, one is etc and the last is www. I figured the database goes into db than I use the following code to connect: 'Open a database connection Set connection = Server.CreateObject("ADODB.Connection") connection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &_ server.MapPath("db/sys.mdb") connection.Open
However this is not working. Anyone have any ideas what I could be missing? I called the new hosting company and they tell me my asp is wrong and that the server info is
MySQL Information UserName: syner008 Password: (hidden) Show Password
MySQL Host: mysql.synergyearthsys.com or mysql.omnis.com Database Name: syner008 MySQL Version: 4.0.22
Can anyone help me? I've already shed some tears in frustration over this!
If you create a folder called "db" under "www" and place the database in there, it should work. Make sure to request "write" permissions to www/db, otherwise you won't be able to write to the db.
I believe the problem you have is, the existing db folder is outside of your root (www). I am not sure how you can connect to it from within the root of the site. Maybe you can use a DSN connection (the hosting company has to set this up for you).
The code the hosting company gave you was for a mySQL database and not Access like you are using.