ASP/Javascript Help

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

jdickson

Established Member
Impact
1
I receive the following error code on my web hosting client's page:
Microsoft JScript compilation error '800a03f7'

Unterminated string constant

/formationsWeb/Includes/JavaScriptOpenDB.asp, line 9

"Data Source=C:\Inetpub\vhosts\abwa.org\httpdocs\_DataStore\" + dbActive)
-------------------------------------------------------------------------^



Please help! Clueless on ASP/Javascript!

Login Page:
<%@ LANGUAGE = JavaScript%>
<%dbActive = "FormationsWeb.mdb"%>
<!--#include file="Includes/JavaScriptOpenDB.asp"-->

<%
var mySQL = "SELECT * FROM tblFormationContacts " +
"WHERE " +
"FirstName = '" + Request.Form("userName") + "'" +
"AND " +
"UserPassword = '" + Request.Form("userPassword") + "'";
var objRS = adoConnection.Execute(mySQL);

if (!(objRS.Bof == true && objRS.Eof == true))
{
Response.Cookies("ValidUser") = "Yes";
Response.Redirect("Info_Updates.asp");
}
else
{
Response.Cookies("ValidUser") = "No";
Response.Redirect("index.asp?attempt=Failure")
}

%>


Process Page:
<%
var dbActive
//dbActive = "FormationsWeb.mdb"

//Open database with JavaScript OLE-DB Connection method....
var adoConnection = Server.CreateObject("ADODB.Connection")
adoConnection.Open("Provider=Microsoft.Jet.OLEDB.4.0;" +
// "Data Source=f:\*\www.*.org\Board\_DataStore\" + dbActive)
"Data Source=C:\Inetpub\vhosts\*.org\httpdocs\_DataStore\" + dbActive)
%>
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I am not sure about the error but try one thing

put <!--#include file="Includes/JavaScriptOpenDB.asp"-->

as your second line and replace <%dbActive = "FormationsWeb.mdb"%> with
<% var dbActive = "FormationsWeb.mdb" %>

watch the space.


also removing the comments from the process page for the variable declaration can help you.
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back