Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

80004005 asp using javascript

Guest
Oct 24, 2006 Oct 24, 2006
i am using dreamweaver mx with ms_access. I set up an asp page that works great when I run it locally on my own system. I upload this page to my host and BAM. I get an error.

---------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/Car_Gallery.asp, line 12
-----------------------

I know this means I can connect to the database. The permissions appear to be correct. So now I dont know what to do... here is the first few lines of my webpage.
---------------------------------
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/myCars.asp" -->
<%
var csCars__MMColParam = "Y";
if (String(Request("MM_EmptyValue")) != "undefined" &&
String(Request("MM_EmptyValue")) != "") {
csCars__MMColParam = String(Request("MM_EmptyValue"));
}
%>
<%
var csCars = Server.CreateObject("ADODB.Recordset");
csCars.ActiveConnection = MM_myCars_STRING;
----------------------------------------

Connections/myCars.asp has the following code.
___________________________
<%
// FileName="Connection_odbc_conn_dsn.htm"
// Type="ADO"
// DesigntimeType="ADO"
// HTTP="false"
// Catalog=""
// Schema=""
var MM_myCars_STRING = "dsn=myCars;"
%>
_______________________

Everything looks good to me but I always get the same error. Where should I start to debug this error? could i write a small page to determine where my site is breaking? does the Connections/myCars.asp need to be in a different directory. my root directory on the server is at: automixm/wwwRoot/connections/ and my webpages are in automixm/wwwRoot/ *.

Any help would be great. thanks
TOPICS
Server side applications
478
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2006 Oct 24, 2006
Don't move the Connections folder unless you know what's going on. Your
connections file states that it's looking for a DSN called myCars. If this
hasn't been created on the server, then the connection is going to fail. Has
it been created on the server? Some of the packages I use don't offer DSN
connections - you need to create a DSN-Less connection yourself.

Try www.connectionstrings.com and modify the sample under Access DB.

This means you'll have 2 connection files - one on your PC and a different
one on the server.

If you're unsure of the path to enter, put this in a test page ('me' can be
anything)
<%
=Server.MapPath("ME")
%>

This should give you the local path to your test file. You should then be
able to modify it to point to your DB folder.

HTH,

Piers


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 24, 2006 Oct 24, 2006
LATEST
Thanks the =Server.MapPath function worked great.

I am just starting to learn Javascript (I program in C for a living) Now I have 2 questions.

First:
How do I set up the second Connection file? my first file just contains the following.....
<%
var MM_myCars_STRING = "dsn=myCars;"
%>

_______________

second:
when I made the following code:

"Driver={Microsoft Access Driver (*.mdb)};" &
"Dbq=c:\Accounts\automixm\wwwRoot\Private\mydatabase.mdb;"

I got the same error but I think this was because the connection folder wasn't set up. If you see a proble with the code please comment. I purchased a book on this but it hasnt arrived in the mail. Thank you
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines