Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2004, 01:46 PM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript compilation (0x800A0400)

I am a Network Admin type, and not a WEB developer, so I need all the help I can get. I have some code that keeps giving me the following Error: Can anyone help. THANKS IN ADVANCE FOR ANY HELP!!!!:)

Microsoft VBScript compilation (0x800A0400)
Expected statement
/test/dbcontrol.asp, line 25
<b>Add a New Record</b>
Here is the code:

<% @Language=VBScript %>
<%
Option Explicit

DIM ColunmNameIntable(5)

ColunmNameIntable(0)="ID"
ColunmNameIntable(1)="EDate"
ColunmNameIntable(2)="HoursWorked"
ColunmNameIntable(3)="OfficeList"
ColunmNameIntable(4)="WorkDescription"
ColunmNameIntable(5)="EmpInitials"

'When displaying data we will use this values
DIM DataName(5)

DataName(0)="ID"
DataName(1)="Date"
DataName(2)="Hours Worked"
DataName(3)="Down Stream Office"
DataName(4)="Work Description"
DataName(5)="Employee"

<b>Add a New Record</b>
<form action=dbaddrecord.asp method=post>
<input type=hidden name=action value=add><br>
<% =DataName(1) %>
:
<input type=text name="<% =ColunmNameIntable(1) %>">
<br>
<% =DataName(2) %><input type=text name="<% =ColunmNameIntable(2) %>"><br>
<% =DataName(3) %><input type=text name="<% =ColunmNameIntable(3) %>"><br>
<% =DataName(4) %><input type=text name="<% =ColunmNameIntable(4) %>"><br>
<% =DataName(5) %><input type=text name="<% =ColunmNameIntable(5) %>"><br>

<input type=submit value=submit>

%>
<%
DIM DB
DIM RS
DIM data1st
if request.querystring="1" then

DIM PathToDatabase ' The location of our database within our server
PathToDatabase="c:\data\test\downstreamwork.mdb"

DIM NameOfTableInDB ' The name of the table in our Access database. In our case this name is "Table1"
NameOfTableInDB="tblmain"
 
Old February 11th, 2004, 08:54 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The font tag is the beginning of HTML and is no longer VBScript. You need to close the script portion of the code...

DataName(5)="Employee"
%>
<b>Add a New Record</b>


Peter
------------------------------------------------------
Work smarter, not harder.
 
Old February 12th, 2004, 10:11 AM
Registered User
 
Join Date: Feb 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That worked great!!! Thanks for your assistance!!

Cliff





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript compilation (0x800A0400) pendemv Classic ASP Databases 1 September 1st, 2008 02:58 PM
Microsoft VBScript compilation (0x800A0401) dayang Classic ASP Basics 14 May 8th, 2008 02:16 AM
Microsoft VBScript compilation (0x800A0400) joeyjoejnr Classic ASP Databases 2 May 9th, 2007 03:22 AM
Microsoft VBScript compilation (0x800A0400) davidclangley ASP.NET 2.0 Basics 0 February 11th, 2007 10:46 AM
VBScript compilation (0x800A0400) Expected stateme Tom_Nguyen Classic ASP Basics 3 January 2nd, 2006 07:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.