Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 January 18th, 2006, 02:45 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the data type should be integer for the 2 values of arrClass4(0,i) and strSearchClass1

 
Old January 18th, 2006, 02:53 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

so sorry, but the new suggestion came up with the following error

(I got this from
Quote:
quote:run the page, right click, view source and post the HTML output of the 'select box code only'
<SELECT size=1 name=SearchClass1 onchange="frmSearch.submit()">

                    <option value="
<p>Microsoft VBScript runtime error '800a000d'
<p>
Type mismatch: 'arrClass4'
<p>
/intranet/ORDept/RADAR_test/RequirementClassification_admin_search.asp, line 239

 
Old January 18th, 2006, 06:17 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

arrClass4 is your array name. You are using it in the loop, we can not see where you created it, just that you are using it. Why you are using an array here I dont understand. In my very first post I gave you the code for your problem, much simpler than what you are using. Did you get this off another forum or is it yours?

You say the data type expected is an integer. Why are you not using the cInt function around the values when you are comparing them? I gave you this:

---------------------
make sure you are not comparing a string to a integer, Try:
<%if (cint(strSearchClass1)= arrClass4(0,i)) then Response.write " selected " end if %>
----------------------

Many posts ago. Look up the cInt function, see what it does (as I have explained) and use it if you want to ensure its an integer.

Put it this way. Youe need to print the two values you are comparing, see they are the same, ensure they are the same data types - then it will work. I am unsure what more I can say that I have not.

Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
asp 3.0 classic&access *formula retrival)? saad_rashad Classic ASP Databases 3 February 18th, 2007 03:47 PM
Data Retrival xbenx Classic ASP Professional 0 January 4th, 2006 10:54 PM
Retrival of Server Side DateTime with ACCESS dubey.kuldeep Access 2 November 1st, 2005 12:37 PM
retrival of decrypted data msrnivas General .NET 0 December 7th, 2004 02:52 AM





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