By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Frustrating problem with connection string

P: n/a

The error code is:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/bicc.nl/Connections/BICCwebsite.asp, line 2

Set Conn = Server.CreateObject("ADODB.Connection")
----^

The connectionstring I'm using:

%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=" & Server.MapPath("../../cgi-bin/bicc.mdb")
Conn.Open DSNtest
%

In combination with (a part of) the following codepage:

%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%
!--#include file="Connections/BICCwebsite.asp" --
%
var Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = DSNtest
Recordset1.Source = "SELECT * FROM Nieuws ORDER BY Datum DESC"
Recordset1.CursorType = 2
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
var Recordset1_numRows = 0
%
%
var Repeat1__numRows = 4;
var Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%
% var MM_paramName = ""; %
%
// *** Go To Record and Move To Record: create strings for maintainin
URL and Form parameters

// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&"
MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_kee pNone="";

// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd()
items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "="
Server.URLencode(Request.QueryString(items.item()) );
}
}

// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd()
items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "="
Server.URLencode(Request.Form(items.item()));
}
}

// create the Form + URL string and remove the intial '&' from each o
the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length 0) MM_keepForm = MM_keepForm.substring(1);
%
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID

strRet = str
If (nLCID -1) Then
oldLCID = Session.LCID
End If

On Error Resume Next

If (nLCID -1) Then
Session.LCID = nLCID
End If

If ((nLCID 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If

If (nLCID -1) Then
Session.LCID = oldLCID
End If

DoDateTime = strRet
End Function
/SCRIPT
html
head
title/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
meta http-equiv="title" content="Aromasys"
meta http-equiv="Content-Language" content="NL"
meta name="Author" content=""
meta name="Distribution" content="GLOBAL"
meta name="Revisit-After" content="14 days"
meta name="keywords" content="."
script language="JavaScript" type="text/JavaScript"
!--
!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0
ia.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document
if((p=n.indexOf("?"))0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&id.forms.length;i++
x=d.forms[i][n];
for(i=0;!x&&d.layers&&id.layers.length;i++
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr =
document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//--
/script
link href="tekst.css" rel="stylesheet" type="text/css"
/head
I think I'm mixing up VBscript with Javascript but where?
Thanks in advance! A beginner...
--
sjanie
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The page's language is set to JavaScript, but that "set" snippet is
VBScript. In view of this, don't you think the problem is actually pretty
clear?

;-)
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.

"sjanie" <sj***********@news.webfrustration.com> wrote in message
news:sj***********@news.webfrustration.com...

The error code is:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/bicc.nl/Connections/BICCwebsite.asp, line 2

Set Conn = Server.CreateObject("ADODB.Connection")
----^

The connectionstring I'm using:

%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=" & Server.MapPath("../../cgi-bin/bicc.mdb")
Conn.Open DSNtest
%

In combination with (a part of) the following codepage:

%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%
!--#include file="Connections/BICCwebsite.asp" --
%
var Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = DSNtest
Recordset1.Source = "SELECT * FROM Nieuws ORDER BY Datum DESC"
Recordset1.CursorType = 2
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
var Recordset1_numRows = 0
%
%
var Repeat1__numRows = 4;
var Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%
% var MM_paramName = ""; %
%
// *** Go To Record and Move To Record: create strings for maintaining
URL and Form parameters

// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&" +
MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_kee pNone="";

// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd();
items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepURL += "&" + items.item() + "=" +
Server.URLencode(Request.QueryString(items.item()) );
}
}

// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd();
items.moveNext()) {
var nextItem = "&" + items.item().toLowerCase() + "=";
if (MM_removeList.indexOf(nextItem) == -1) {
MM_keepForm += "&" + items.item() + "=" +
Server.URLencode(Request.Form(items.item()));
}
}

// create the Form + URL string and remove the intial '&' from each of
the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length 0) MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length 0) MM_keepForm = MM_keepForm.substring(1);
%
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT
function DoDateTime(str, nNamedFormat, nLCID)
dim strRet
dim nOldLCID

strRet = str
If (nLCID -1) Then
oldLCID = Session.LCID
End If

On Error Resume Next

If (nLCID -1) Then
Session.LCID = nLCID
End If

If ((nLCID 0) Or (Session.LCID = nLCID)) Then
strRet = FormatDateTime(str, nNamedFormat)
End If

If (nLCID -1) Then
Session.LCID = oldLCID
End If

DoDateTime = strRet
End Function
/SCRIPT
html
head
title/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
meta http-equiv="title" content="Aromasys"
meta http-equiv="Content-Language" content="NL"
meta name="Author" content=""
meta name="Distribution" content="GLOBAL"
meta name="Revisit-After" content="14 days"
meta name="keywords" content="."
script language="JavaScript" type="text/JavaScript"
!--
!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
ia.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&id.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&id.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr =
document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i args.length-1; i+=3) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?
args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn :
img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i nbArr.length; i++) { img=nbArr[i]; img.src =
img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i args.length-1; i+=2) if ((img = MM_findObj(args[i]))
!= null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//--
/script
link href="tekst.css" rel="stylesheet" type="text/css"
/head
I think I'm mixing up VBscript with Javascript but where?
Thanks in advance! A beginner...
--
sjanie

Jul 21 '05 #2

P: n/a
On Tue, 19 Oct 2004 13:26:57 +0100, sjanie
<sj***********@news.webfrustration.com> wrote:

This is VBScript format:
Set Conn = Server.CreateObject("ADODB.Connection")
This tells the page you don't use vbscript:
%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%


JavaScript would generate the error you posted since the syntax is
incorrect. Set the language to VBScript if that's what you intend to
use, either in IIS as the default or specified in your code.

Jeff
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.