Forums
This topic is locked
ODBC Connectivity
18 May 2007 02:40:44 Bryan Mr. posted:
Building a new website with Dreamweaver MX 2004. I have an access database with the name FamilyDB.mdb in the db directory outside the wwwroot.
System DSN = FamilyLawDatabase; created locally and duplicated on the web server.
Traditional file structure on web server:
db/FamilyDB.mdb
wwwroot/
Connections/FamilyConnection.asp
Created the DSN named FamilyLawDatabase to correspond with my local nomenclature.
Initially, I ploaded an .asp page with no problem.
Then, I added a recordset using Dreamweaver MX 2004 that uses the connection "FamilyConnection" and the corresponding asp page "FamilyConnection.asp" that is created in Dreamweaver MX 2004. Uploaded all files to the web server.
Then, I get the following message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.
/contact/georgia_divorce_law_contact1.asp, line 8
Here is the code with line numbers:
1<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
2<!--#include file="../../Connections/FamilyConnection.asp" -->
3<%
4Dim rsContact
5Dim rsContact_numRows
7Set rsContact = Server.CreateObject("ADODB.Recordset"
8rsContact.ActiveConnection = MM_FamilyConnection_STRING
rsContact.Source = "SELECT * FROM FamilyCon"
rsContact.CursorType = 0
rsContact.CursorLocation = 2
rsContact.LockType = 1
rsContact.Open()
rsContact_numRows = 0
%>
Please help. If anyone is interested in a little consulting off of this website, please call me at 678.858.8160 to discuss (I live in EST). My law firm has me designated as the web guy and I haven't done web design since I got out of law school. I haven't done any vbscripting in almost five years and I am rusty to say the least. In addition to this problem, I am having problems passing form data, using CDONTS (excuse me--CDOSYS these days) and would gladly pay someone to get me back on track and/or fix errors on pages, etc . . . Thank you in advance.
Replies
Replied 28 May 2007 12:41:00
28 May 2007 12:41:00 satheesh Dominic replied:
Well,
<b>your Error Message is:</b>
<i>
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. "
</i>
<b>Understanding the Error message</b>
This Error message shows when the specified DSN (FamilyLawDatabase) is already being used by another application. Once other applications use the same DSN , they will lock that file for exclusive use. That is why you get this error Message.
<b> how to Solve ?</b>
DSN. <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Make sure that nobody/nothing other than you/Your application gets permission to access that particular DSN. You can do it by assigning a password to your "FamilyDB.mdb" file and making necessary changes in the connection page (wwwroot/Connections/FamilyConnection.asp).
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
FIrst, Please download the whole site back to local folder and make sure that the application is running fine locally. once your whole application runs successfully in your local system using a local DSN(FamilyLawDatabase)..You define the same DSN on the server...then upload the mdb file to the specified "db" folder on the server. Forget not to assign password to the mdb file and modify the connection file(FamilyConnection.asp) with the username as"admin" and password with the access file's password..
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
At the end your Familyconnection.asp will be something like this;
<b>
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Familyconnection_STRING
MM_Familyconnection_STRING = "dsn=FamilyLawDatabase;uid=admin;pwd=12345;"
%>
</b>
<i>Replace the pwd="yourdatabase's passsword"</i>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
If you have to get more assistance from me on CDONTS/CDOSYS....etc.Mail me back @
<b>your Error Message is:</b>
<i>
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. "
</i>
<b>Understanding the Error message</b>
This Error message shows when the specified DSN (FamilyLawDatabase) is already being used by another application. Once other applications use the same DSN , they will lock that file for exclusive use. That is why you get this error Message.
<b> how to Solve ?</b>
DSN. <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Make sure that nobody/nothing other than you/Your application gets permission to access that particular DSN. You can do it by assigning a password to your "FamilyDB.mdb" file and making necessary changes in the connection page (wwwroot/Connections/FamilyConnection.asp).
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
FIrst, Please download the whole site back to local folder and make sure that the application is running fine locally. once your whole application runs successfully in your local system using a local DSN(FamilyLawDatabase)..You define the same DSN on the server...then upload the mdb file to the specified "db" folder on the server. Forget not to assign password to the mdb file and modify the connection file(FamilyConnection.asp) with the username as"admin" and password with the access file's password..
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
At the end your Familyconnection.asp will be something like this;
<b>
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Familyconnection_STRING
MM_Familyconnection_STRING = "dsn=FamilyLawDatabase;uid=admin;pwd=12345;"
%>
</b>
<i>Replace the pwd="yourdatabase's passsword"</i>
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
If you have to get more assistance from me on CDONTS/CDOSYS....etc.Mail me back @