I am developing a site in dreaweaver cs4 that searches for business by state using an MS Access data base and a connection string. I cannot get the forms to connect.
<%@LANGUAGE="JavaScript"%>
<!--#include virtual="/Connections/avdsmmber.asp" -->
<%
var states_cmd = Server.CreateObject ("ADODB.Command");
states_cmd.ActiveConnection = MM_avdsmmber_STRING;
states_cmd.CommandText = "SELECT businessname, business_address, businesscity, businessstate, businesszip, businesscountry, businessphone, businessfax, website, email FROM Results ORDER BY businessstate ASC";
states_cmd.Prepared = true;
var states = states_cmd.Execute();
var states_numRows = 0;
%>
<%
var Repeat1__numRows = -1;
var Repeat1__index = 0;
states_numRows += Repeat1__numRows;
%>
here is the error I get -
Microsoft JScript compilation error '800a03ec'
I would have to bet money you do, you just aren't understanding. The code line is part of the entire output for the response, so that line includes every line of code you put into the return. So the code lines start at the top of the page and the more and more you write to the response, you are adding new lines. The compiler is being told, "this is my response", and your code is telling it pull a little from here, then a little from here, and in the end it all gets sent as one chunk.
As far as your error, you specified you are using Javascript in the coding, as per the tag you gave us. Again, I would have to put down cash that you just accidentally forgot to close a statement with the ";", semicolon. So doubt check your code, line by line, especially in the part that has the statesearch var, since that was mentioned in the error, and make sure you closed out your statement. Let us know if you need more help, and the only way we can help would be with more info, like more code, you have some things declared we can see, so we are making guesses for you.
I love how people get an attitude when THEY asked for help.
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: ["smoothcontainer", "navigations-avds.html"] //"markup" or ["container_id", "path_to_menu_file"]
})
ddsmoothmenu.init({
mainmenuid: "smoothmenu2", //Menu DIV id
orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
//customtheme: ["#804000", "#482400"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
Here is the new error...Microsoft JScript compilation error '800a03ea'
Syntax error
/TMP2id398hrpu.asp, line 473
}
^
Here is the code it end at line 242...
<%@LANGUAGE="JavaScript"%>
<!--#include virtual="/Connections/avdsmmber.asp" -->
<%
var statesearch_cmd = Server.CreateObject ("ADODB.Command");
statesearch_cmd.ActiveConnection = MM_avdsmmber_STRING;
statesearch_cmd.CommandText = "SELECT businessname, business_address, businesscity, businessstate, businesszip, businesscountry, businessphone, businessfax, website, email FROM Publicinfo ORDER BY businessstate ASC";
statesearch_cmd.Prepared = true;
var statesearch = statesearch_cmd.Execute();
var statesearch_numRows = 0;
%>
<%
var Repeat2__numRows = 10;
var Repeat2__index = 0;
statesearch_numRows += Repeat2__numRows;
%>
<%
var Repeat2__numRows = -1;
var Repeat2__index = 0;
statesearch_numRows += Repeat2__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<link rel="stylesheet" type="text/css" href="/ddsmoothmenu.css" />
<link rel="stylesheet" type="text/css" href="/ddsmoothmenu-v.css" />
/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<script type="text/javascript">
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: ["smoothcontainer", "navigations-avds.html"] //"markup" or ["container_id", "path_to_menu_file"]
})
ddsmoothmenu.init({
mainmenuid: "smoothmenu2", //Menu DIV id
orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
//customtheme: ["#804000", "#482400"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})
Thank you, looks so obvious after you point it out......now a new error....
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xd98 Thread 0x19fc DBC 0x1954f94 Jet'.
/TMPladfs8ig1w.asp, line 5
code from line 5..
statesearch_cmd.ActiveConnection = MM_avdsmmber_STRING;
Bookmarks