JScript for the .NET Framework


Need help with Drivers error '80004005'


I keep getting this error when trying to submit a form I created on Dreamweaver that is connected to an Access database:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/egs intranet/Connections/testpage.asp, line 76
My include page is:
<% // FileName="Connection_odbc_conn_dsn.htm" // Type="ADO" // DesigntimeType="ADO" // HTTP="false" // Catalog="" // Schema="" var MM_Testing_STRING = "DSN=Testing" %>
And the DSN=Testing is pointing to the correct web server. Could this have something to do with permissions on that server??
My Full code for my test form is:
<%#LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <!--#include virtual="/egs intranet/Connections/Testing.asp" --> <% // *** Edit Operations: declare variables
// set the form action variable var MM_editAction = Request.ServerVariables("SCRIPT_NAME"); if (Request.QueryString) {   MM_editAction += "?" + Server.HTMLEncode(Request.QueryString);
}
// boolean to abort record edit var MM_abortEdit = false;
// query string to execute var MM_editQuery = ""; %> <% // *** Insert Record: set variables
if (String(Request("MM_insert")) == "form1") {
  var MM_editConnection = MM_Testing_STRING;   var MM_editTable  = "tblTest";   var MM_editRedirectUrl = "ESCThankYou.asp";   var MM_fieldsStr = "ID|value|Name|value|City|value";   var MM_columnsStr = "ID|none,none,NULL|Name|',none,''|City|',none,''";
  // create the MM_fields and MM_columns arrays   var MM_fields = MM_fieldsStr.split("|");   var MM_columns = MM_columnsStr.split("|");
  // set the form values   for (var i=0; i+1 < MM_fields.length; i+=2) {     MM_fields[i+1] = String(Request.Form(MM_fields));   }
  // append the query string to the redirect URL   if (MM_editRedirectUrl && Request.QueryString && Request.QueryString.Count > 0) {     MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + Request.QueryString;   }
}
%> <% // *** Insert Record: construct a sql insert statement and execute it
if (String(Request("MM_insert")) != "undefined") {
  // create the sql insert statement   var MM_tableValues = "", MM_dbValues = "";   for (var i=0; i+1 < MM_fields.length; i+=2) {     var formVal = MM_fields[i+1];     var MM_typesArray = MM_columns[i+1].split(",");     var delim =    (MM_typesArray[0] != "none") ? MM_typesArray[0] : "";     var altVal =   (MM_typesArray[1] != "none") ? MM_typesArray[1] : "";     var emptyVal = (MM_typesArray[2] != "none") ? MM_typesArray[2] : "";     if (formVal == "" || formVal == "undefined") {       formVal = emptyVal;     } else {       if (altVal != "") {         formVal = altVal;       } else if (delim == "'") { // escape quotes         formVal = "'" + formVal.replace(/'/g,"''") + "'";       } else {         formVal = delim + formVal + delim;       }     }     MM_tableValues += ((i != 0) ? "," : "") + MM_columns;     MM_dbValues += ((i != 0) ? "," : "") + formVal;   }   MM_editQuery = "insert into " + MM_editTable + " (" + MM_tableValues + ") values (" + MM_dbValues + ")";
  if (!MM_abortEdit) {     // execute the insert     var MM_editCmd = Server.CreateObject('ADODB.Command');     MM_editCmd.ActiveConnection = MM_editConnection; ------------------------------->>>ERROR     MM_editCmd.CommandText = MM_editQuery;     MM_editCmd.Execute();     MM_editCmd.ActiveConnection.Close();
    if (MM_editRedirectUrl) {       Response.Redirect(MM_editRedirectUrl);     }   }
}
%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head>
<body> <form method="POST" action="<%=MM_editAction%>" name="form1">   <table align="center">     <tr valign="baseline">       <td nowrap align="right">ID:</td>       <td><input type="text" name="ID" value="" size="32">       </td>     </tr>     <tr valign="baseline">       <td nowrap align="right">Name:</td>       <td><input type="text" name="Name" value="" size="32">       </td>     </tr>     <tr valign="baseline">       <td nowrap align="right">City:</td>       <td><input type="text" name="City" value="" size="32">       </td>     </tr>     <tr valign="baseline">       <td nowrap align="right"> </td>       <td><input type="submit" value="Insert record">       </td>     </tr>   </table>   <input type="hidden" name="MM_insert" value="form1"> </form> <p> </p> </body> </html>
Any help would be great.
Thanks, Justine 
You need to create a DSN that matches the "Testing" in the following statement.
var MM_Testing_STRING = "DSN=Testing"
You can learn how to do this by going to MSDN and searching for creating Create DSN.
http://msdn2.microsoft.com/en-us/library/79hh5st2.aspx
 

Related Links

jquery intellesnese
To display a Yes/No dialog box after reading a file !!
Is there a VBScript for .NET?
Microsoft.JScript.Vsa.VsaEngine
HOWTO set a AJAX:TabContainer's height in javascript at run time.
Consume Web Service with Transport Layer Security (HTTPS) from JavaScript
Multi-threading in javascript
Click handler on popup does not run properly in a .NET environment
How to update ASP.NET image control periodically?
Format date before SQL Query execution
Alert window in aspx page.
Class doesn't support automation - or - how to install WS 5.7 on an XP SP3
how to do validation in cshtml (MVC)
How to implement IObjectSafety programmatically in JScript.NET
Reports and Graphs - JQuery
MENU bar like forbes.com

Categories

MSDN
Microsoft Office for D...
.NET Framework
Commerce Server
Data Platform Development
SQL Server
WebsitePanel
Microsoft Research
Lync Server
Archive
Microsoft Azure
Archived Forums E-H
Skype for Business
Software Entwicklung f...
Open source Developmen...
Forums Redesign - Q&A ...
Off-Topic Posts (Do No...
Visual Studio Editor
Register and Manage Ac...
Payouts and Reporting
Network Monitor
User Interface develop...
Windows Desktop Search...
Windows Filtering Plat...
Developing Apps for Of...
General Office Develop...
Open XML Format SDK
Pricing & Billing
Azure CDN
Machine Learning
Language Understanding...
Azure IoT Hub
Azure Blockchain
Team Foundation Server...
Commerce Server 2007
ADO.NET Managed Providers
WCF Data Services
Code Contracts
.NET Compact Framework
SQL Server XML
Database Design
SQL Server Migration
Standard 7: Embedded E...
Standard 7: Components...
Windows Embedded Compa...
SQL Server 2012 Spatia...
SQL Server 2012 Analys...
SQL Server 2012 Databa...
Windows Live  Spaces: ...
The Samsung Windows De...
Visio General Question...
WCF RIA Services with ...
Connected Services Fra...
Surface Application De...
Visual Studio Report C...
Retired InfoPath Forms...
.NET Framework 4 setup...
Building Windows Store...
Core Coding Experience...
Developer Documentatio...
Feedback for Visual Ba...
HD DVD Interactivity A...
Git, Mercurial and Dro...
Popfly Bugs and Sugges...
Security for Azure
SQL Server Modeling
SyncFx - Microsoft Syn...
SQL Server in Azure VMs
SQL Server 2014 SQL To...
Team Foundation Server...
Tellme Studio (retired)
Using Visual Round Tri...
Tools for Windows Phon...
Tools for Windows Stor...
Visual C++ Express Edi...
Visual Studio 2008 SP1...
Visual Studio Lab Mana...
Visual Studio Team Sys...
Visual Studio Web Perf...
Web Sandbox - General
Windows CardSpace ('In...
Windows Live Search: D...
Building Windows Store...
XML in Windows (MSXML ...
Windows Phone Preview ...
Kinect for Windows v1 SDK
.NET Native Preview
Skype Web SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile