473,414 Members | 1,636 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

MultiSelect List boxes as query parameters

10
i am trying to pass the value "comapre" of 2,3, or 4 checkbox to next page
but i am getting errors.
Application uses a value of the wrong type for the current operation. LINE
rsSearch_cmd.Parameters.Append rsSearch_cmd.CreateParameter("param1", 5, 1, -1, rsSearch__MMColParam) ' adDouble

Query string is like this

compare.asp?compare=466&compare=4600

Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim rsSearch__MMColParam
  3. rsSearch__MMColParam = "%"
  4. If (Request.QueryString("compare") <> "") Then 
  5.   rsSearch__MMColParam = Request.QueryString("compare")
  6. End If
  7. %>
  8. <%
  9. Dim rsSearch
  10. Dim rsSearch_cmd
  11. Dim rsSearch_numRows
  12.  
  13. Set rsSearch_cmd = Server.CreateObject ("ADODB.Command")
  14. rsSearch_cmd.ActiveConnection = MM_classifieds_STRING
  15. rsSearch_cmd.CommandText = "SELECT * FROM dbo.NEWS WHERE NEWS_ID IN (?)" 
  16. rsSearch_cmd.Prepared = true
  17. rsSearch_cmd.Parameters.Append rsSearch_cmd.CreateParameter("param1", 5, 1, -1, rsSearch__MMColParam) ' adDouble
  18.  
  19. Set rsSearch = rsSearch_cmd.Execute
  20. rsSearch_numRows = 0
  21.  
  22.  
  23. %>  
  24.  
Is there another way to do this.

Thank you
Jun 29 '09 #1
2 2204
jhardman
3,406 Expert 2GB
every point of data that goes through querystring is interpreted as a string. You will have to convert it to a number with cint() or some such. does this make sense?

Jared
Jul 1 '09 #2
jdom
10
can you guide to some kind of tutorial how to this

Thank you
Jul 1 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jillian Cee | last post by:
I have a multiselect list box (simple). I need to find out how to get Access to recognise my multiple selections firstly (I believe) then I want these selections to go into a query so that I can...
3
by: Shannan Casteel via AccessMonster.com | last post by:
I have three main tables. The first is the table that my main form will be based on. This is where the user will enter all the data. The table is called TechnicalProblemsTable. It looks like...
3
by: syounger | last post by:
Hi. I have a report in Access 2000 that is based on selection made from a series of interdependent list boxes. The boxes I have right now are Source, Table, Column, Date. The user chooses Source...
1
by: tod4 | last post by:
Hi, My problem: I have query with value klient and product. On my form Im using multiselect box as filter of klient value. Now I would like to use second multiselect on this form for product...
5
by: doncee | last post by:
Please point me in the direction of some good, free web based resources\ documentation for information on developing the multi select list boxes. Have made extensive use of the non-multi list...
3
by: jschmidt | last post by:
Hello Everyone, I have an access application that has a listbox on a form. The list box is set to multiselect. I want to be able to use the selected items in a parameterized query that is...
1
by: syam | last post by:
Hai Friends.. I have a search page and contains multiple multiselect list boxes, each containing 6 options. I want to check whether the user has checked atleast one option in each of...
5
by: martin DH | last post by:
Hello, The details are below, but I have a simple form (Form1) with two objects and a "search" command button. When the two objects are cascading combo boxes (the form creates the parameters for a...
1
by: Redbeard | last post by:
I am a newbie running Access 2003. A couple of weeks back a member named ADezil help me write a code that let a , MultiSelect Listboxs that run a Query on a Form (many thanks). I have used this...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.