|
 |
asp_databases thread: Microsoft VBScript compilation error '800a0411'
Message #1 by Leo Clayton <claytonl@z...> on Thu, 25 Jan 2001 18:58:31 -0500
|
|
--=====================_705637713==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
I am doing some exercises in beginning ASP Databases; specifically ch. 9
using the AddNew Method of the Recordset object. My problem is that when I
submit my form I get an error from the adovbs include file that says:
Microsoft VBScript compilation error '800a0411' Name redefined
/BeginningASPDatabases/Chapter.9/adovbs.inc, line 14 Const
adOpenForwardOnly = 0 ---------^ Here is my code from my form page:
Chapter 9 Recordset Methods
Method - AddNew - BoatCLass Form
Form to enter a New Class of Boats
Please provide the following information for the new class
Name
Length in feet
Weight in pounds
Date Please enter as mm/dd/yy
Here is my code from my response page:
Chapter 9 Recordset Methods
Method - AddNew - BoatClass Response
" Response.Write "Click here to correct" Response.End End If dim oRS set
oRS=server.CreateObject("adodb.recordset") oRS.Open "BoatClass",
"DSN=Sailors2", adOpenDynamic, adLockPessimistic oRS.AddNew
oRS("ClassName") = varClassName oRS("ClassLength") = varClassLength
oRS("ClassWeight") = varClassWeight oRS("ClassEntered") = varClassEntered
oRS.UpdateBatch Response.Write "Your new class has been entered" 'Read
list, with new record, back to user Response.Write "List of all classes"
Response.Write "
" Response.Write "IDNameLength" Response.Write "WeightDate Entered"
Response.Write "" Response.write oRS.GetString(adClipString,,"","
"," ") Response.Write "
" Response.Write "
" %> <MethodAddNewBoatClassForm.asp> Click to enter another class
Message #2 by Imar Spaanjaars <Imar@S...> on Fri, 26 Jan 2001 11:54:58 +0100
|
|
Leo,
I can't exactly see what is happening because I received your mail rather
messed up (using HTML mail??) but make sure you are NOT doing the following:
1. Include the adovbs.inc multiple times in one file. This is also true for
"inherited" includes (pages you include that include the adovbs.inc as well)
2. Use an include for adovbs.inc AND define the constants yourself, ie:
<!--#include file="ADOVBS.inc"-->
<%
CONST adOpenForwardOnly = 0
%>
By including the adovbs.inc file, you already have defined the constants,
like adOpenForwardOnly. Defining them again in the same page will lead to
an error.
HtH
Imar
At 06:58 PM 1/25/2001 -0500, you wrote:
>I am doing some exercises in beginning ASP Databases; specifically ch. 9
>using the AddNew Method of the Recordset object. My problem is that when I
>submit my form I get an error from the adovbs include file that says:
>Microsoft VBScript compilation error '800a0411' Name redefined
>/BeginningASPDatabases/Chapter.9/adovbs.inc, line 14 Const
>adOpenForwardOnly = 0 ---------^ Here is my code from my form page: <%@
>Language=VBScript
Message #3 by Leo Clayton <claytonl@z...> on Fri, 26 Jan 2001 09:09:21 -0500
|
|
Imar,
Thanks!! That was my problem (#1 below). Everything is working fine!!!
Leo
At 11:54 AM 1/26/01 +0100, you wrote:
>Leo,
>
>I can't exactly see what is happening because I received your mail rather
>messed up (using HTML mail??) but make sure you are NOT doing the following:
>
>1. Include the adovbs.inc multiple times in one file. This is also true
>for "inherited" includes (pages you include that include the adovbs.inc as
>well)
>2. Use an include for adovbs.inc AND define the constants yourself, ie:
> <!--#include file="ADOVBS.inc"-->
> <%
> CONST adOpenForwardOnly = 0
> %>
>By including the adovbs.inc file, you already have defined the constants,
>like adOpenForwardOnly. Defining them again in the same page will lead to
>an error.
>
>HtH
>
>Imar
>
>
>
>At 06:58 PM 1/25/2001 -0500, you wrote:
>>I am doing some exercises in beginning ASP Databases; specifically ch. 9
>>using the AddNew Method of the Recordset object. My problem is that when
>>I submit my form I get an error from the adovbs include file that says:
>>Microsoft VBScript compilation error '800a0411' Name redefined
>>/BeginningASPDatabases/Chapter.9/adovbs.inc, line 14 Const
>>adOpenForwardOnly = 0 ---------^ Here is my code from my form page: <%@
>>Language=VBScript
>
>
|
|
 |