Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Another ASP Question

Posted on 2001-07-16
9
153 Views
Last Modified: 2013-12-24
VFP98, Win98 IE5.5
What could be wrong with this bit of code?

<%SQL = "SELECT Contest.ContestID,Contest.Title FROM Contest"
Set objConnection = Server.CreateObject("ADODB.Connection")
objConnection.Open "Sphinx"
Set objCommand = Server.CreateObject("ADODB.Command")
Set RS = Server.CreateObject("ADODB.Recordset")
objCommand.CommandText = SQL
objCommand.CommandType = adCmdText
Set objCommand.ActiveConnection = objConnection
RS.Open objCommand,,adOpenForwardOnly,adLockReadOnly%>

<h2>Select A Sphinx</h2>

<form method="POST" action="Sphinx2.asp">
  <p><select name="Contest" size="1">
<% Do While Not RS.EOF %>    <option value="<% = RS("ContestID") %>"><% = RS("Title") %></option>
<% RS.MoveNext
Loop
RS.Close
Set RS = Nothing %>  </select><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset"
  name="B2"></p>

The script to set up the SQL commands is straight from another page where it works.  I have played around with it but keep getting an error with it.  I believe the problem is in the Post method or below but I get an error in line 15.
0
Comment
Question by:slink9
  • 5
  • 3
9 Comments
 
LVL 7

Accepted Solution

by:
ClassyLinks earned 50 total points
ID: 6286990
>>I get an error in line 15.

#1 Which is line 15 in your page?
#2 Does the error occur on this page or sphinx2.asp?
#3 What does the error say, exactly?
0
 
LVL 23

Author Comment

by:slink9
ID: 6287032
1.Counting from the top, starting with 1, and including each blank as a line, number 15 would be

objCommand.CommandType = adCmdText

2.Sphinx3

3.ADODB.Command error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/asp/Database/Sphinx3.asp, line 15

0
 
LVL 23

Author Comment

by:slink9
ID: 6287152
Starting at the top (at 1) and counting the script as one line, number 15 would be

<% Do While Not RS.EOF %>    <option value="<% = RS("ContestID") %>"><% = RS("Title") %></option>
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 23

Author Comment

by:slink9
ID: 6287380
Thanks.  Problem found.  It was a typo in the book.  They had
<--Include xx-->
when it should have been
<--#Include xx-->
Stupid book!!
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6287441
You didn't need to award me the points....I didn't really help.

I will ask CS to return them to you.
0
 
LVL 23

Author Comment

by:slink9
ID: 6287460
You tried.  Besides, I have 500 and only a couple of weeks to use them.  No biggee.
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 6287975
slink9,
I have been asked by ClassyLinks to refund your points for this question. Looking at your profile I see you have been a member for a while. I will let you decide what action you would like to do with this question.
1) Keep it as it is
2) Reduce the points to 0 and keep it in the PAQ
3) Delete it after reducing the points to 0

BTW
I started programming on a TI994A with their version of basic and assembler, moved on to QuickBasic (not qbasic) with compiler and Rbase 5000. So we all did not start out in Qbasic LOL :)

kb
Community Support Moderator
Experts Exchange
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6288155
Up to you slink.  I just don't want to appear points greedy...I've made my EE "quota" for the month and am always glad to help....no matter what the point level.

Cheers & Happy Coding!
0
 
LVL 23

Author Comment

by:slink9
ID: 6289081
It is fine to leave it as-is.  I am sure I will have plenty more questions, especially after I finish the book and attempt to create something that is actually useful using ASP.  Thanks for the help.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
I need a solution to a Webpage for Wholesale Availability. 11 53
Spell check for online editor 7 79
Collapseable list of URLs. 10 140
Grunt No Clean Targets 6 186
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question