472,368 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,368 software developers and data experts.

Frustrating problem with connection string


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
2 1946
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sjanie | last post by:
The error code is: Microsoft JScript compilation error '800a03ec' Expected ';' /bicc.nl/Connections/BICCwebsite.asp, line 2 Set Conn = Server.CreateObject("ADODB.Connection") ----^
0
by: Rob Levine | last post by:
(This post also available at http://roblevine.blogspot.com/2004/11/frustrating-http-connection-behaviour.html in a slightly more readable format!) Hi All, I seem to be having a bit of a...
4
by: Child | last post by:
I am feeling frustrated and I am willing to bet its something stupid but I could really use some help. I have a class called anEvent. On my web form I have a button which creates a new anEvent...
3
by: Loui Mercieca | last post by:
Hi, I have a very strange and frustrating error. I developed an application, tested it and it works fine. Then i deploy it to another machine ( no installation, direct file transfer ) but it...
4
by: Rahul Anand | last post by:
Getting SQL Exception when trying to implement Connection based Trasaction using SQL Helper class. I am using the follwing function to execute my stored procs: -=-=-=- ExecuteScalar(ByVal...
2
by: Terry Olsen | last post by:
Creating a test app to perfect some code before putting it in a production app. Test app works perfectly, doesn't work at all in the production app. Can't figure out why...
9
by: craig.overton | last post by:
All, I am currently developing an FTP class in VB.NET. It's kid tested, mother approved when trying to access an FTP Server on a Windows box meaning I can connect, run commands, upload and...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
5
oll3i
by: oll3i | last post by:
my librarybean package library.ejb; import java.sql.*; import javax.ejb.*; import library.common.*; @Stateless @Remote
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.