Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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 October 13th, 2004, 06:54 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript compilation error '800a0401'

when i run the code on my ho0me pc it works fine but when i upload the same file it gives this error io could nto get it why plz help
Microsoft VBScript compilation error '800a0401'
Expected end of statement
Erorr in this search file name is Search.asp

<FORM action="Search_Result.asp" method=POST id=form1 name=form1>
<select name="nm">
<%
dim objConn,my_sql,Rs
my_sql="Select name from Teaching order by name"

Set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("School.mdb"))

Set Rs=objConn.Execute(my_sql)
do while not Rs.EOF
Response.Write "<option value='" & Rs("Name")& "'>"
Response.Write Rs("Name")
Rs.MoveNext
loop
Rs.Close
Set objRs=nothing
objConn.close
Set objConn=nothing

%>

no if statements yeah it gives errors somthing like this or on this line i mean
Microsoft VBScript compilation error '800a0401'

Expected end of statement

Search.asp, line 19

Response.Write ( objRs("Name") ) objRs.MoveNext
------------------------------------^
eriler it was givening error on braces which i included after response.write ok thanx in advance for lookign into the problmes
 
Old October 14th, 2004, 01:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Are you using RS or objRs?
Code:
Set objRs=nothing
_________________________
- Vijay G
Strive for Perfection
 
Old October 14th, 2004, 07:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Vijay is right, you need to use RS, because you have RS defined throughout. However, the code that it's giving you the error for is not the code you posted. The code you posted should be Rs not objRS, and it is in different form than the code posted.

Brian
 
Old October 16th, 2004, 12:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Has that been resolved?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript compilation error '800a03f6' jdutwell Classic ASP Basics 3 April 2nd, 2008 01:50 PM
Microsoft VBScript compilation error '800a03f6' ksrhyd Classic ASP Professional 0 October 11th, 2007 07:53 AM
Microsoft VBScript compilation error '800a0401' aduggan Classic ASP Databases 1 May 5th, 2007 05:31 AM
Microsoft VBScript compilation error '800a0408' tarzannn Classic ASP Professional 2 February 3rd, 2006 08:55 AM
Microsoft VBScript compilation error karlzoe Classic ASP Databases 2 December 29th, 2004 10:44 AM





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