Are we using a dsn-less connection?
-
- Posts: 11
- Joined: Wed Sep 04, 2013 2:44 pm
Are we using a dsn-less connection?
Hi and HELP!,
I had to switch sites was on Jabry now on webng. I am unable to get a correct path to the database. I've changed the directory from db to data as instructed in the webng faq. Here is the sample code that they provide:
You must use a dsn-less connection when connecting to your database. Below is an example how to connect to your database using a dsn-less connection.
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("data/database.mdb") & ";"
objConn.Open
%>
Are we currently coded to do this? Or does anyone know how to fix my problem?
Thanks,
Ron
I had to switch sites was on Jabry now on webng. I am unable to get a correct path to the database. I've changed the directory from db to data as instructed in the webng faq. Here is the sample code that they provide:
You must use a dsn-less connection when connecting to your database. Below is an example how to connect to your database using a dsn-less connection.
<%
DIM objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath ("data/database.mdb") & ";"
objConn.Open
%>
Are we currently coded to do this? Or does anyone know how to fix my problem?
Thanks,
Ron
- raider_nation
- Posts: 34
- Joined: Mon Aug 26, 2013 8:10 pm
Re: Are we using a dsn-less connection?
Yes, we use a dsn-less connection. The first thing I would check is to make sure the data directory is read writable. What errors are you receiving?
-
- Posts: 11
- Joined: Wed Sep 04, 2013 2:44 pm
Re: Are we using a dsn-less connection?
Microsoft JET Database Engine error '80004005'
Could not delete from specified tables.
/_____10_/PPFBL/weeklyEntry.asp, line 718
I got this when trying to enter a pick. (Hit the update button)
From the FAQ on the webng site:
How can I set write permissions to my databases?
The "data" directory has write permissions. Therefore, please place databases that require write permissions in that folder.
Why do I encounter "Cannot update database or object is read-only" error message?
You must give your database write permissions. To do this please place your databases in the "data" directory.
I am in the data directory.
Could not delete from specified tables.
/_____10_/PPFBL/weeklyEntry.asp, line 718
I got this when trying to enter a pick. (Hit the update button)
From the FAQ on the webng site:
How can I set write permissions to my databases?
The "data" directory has write permissions. Therefore, please place databases that require write permissions in that folder.
Why do I encounter "Cannot update database or object is read-only" error message?
You must give your database write permissions. To do this please place your databases in the "data" directory.
I am in the data directory.
Re: Are we using a dsn-less connection?
Are you in the "Data" directory that you created when you uploaded the ASP software, or are you in the "data" directory that your web host has already created?
Did you put your ASP files in your "root" directory or a sub-directory?
Did you put your ASP files in your "root" directory or a sub-directory?
-
- Posts: 11
- Joined: Wed Sep 04, 2013 2:44 pm
Re: Are we using a dsn-less connection?
I deleted their data directory and created a new one. My asp files are in the root directory. I'm going to send you a private message.
- raider_nation
- Posts: 34
- Joined: Mon Aug 26, 2013 8:10 pm
Re: Are we using a dsn-less connection?
That is the problem. You deleted their data directory. You can rename it, don't delete it. When you created your own data directory, it does not have the right permissions and you can not change it. You will have to have them create a new one for you.
Re: Are we using a dsn-less connection?
Yep, totally agree with Raider, you will need to contact them and have them set the write permissions on your data directory.
In case they decide to delete your data directory make sure you have save a copy of that directory locally on your computer so that anything you have it in can be re-uploaded after they make their changes.
phil
In case they decide to delete your data directory make sure you have save a copy of that directory locally on your computer so that anything you have it in can be re-uploaded after they make their changes.
phil
-
- Posts: 11
- Joined: Wed Sep 04, 2013 2:44 pm
Re: Are we using a dsn-less connection?
Ended up going to Somee.com. The other site never got back to me.
Re: Are we using a dsn-less connection?
I tried to use Somee and it worked for a while, then after about week-2 or so they just deleted my site and I lost all access to it. I would suggest that you do a backup of your data file on a regular basis in case that happens to you.
Phil
Phil