Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP string to long int?

Posted on 2004-03-28
3
Medium Priority
?
254 Views
Last Modified: 2006-11-17
how to change string to long int? or array to long int?
my ID is long integer. but i cannot select out the noID

can anyone tell me whats wrong in this?

dim noID
noID=CInt(newList(0))               'my newList(0) is 4567

<%
set conn = Server.CreateObject("ADODB.Connection")
      conn.Provider="Microsoft.Jet.OLEDB.4.0"
      conn.Open(Server.MapPath("Database.mdb"))
      set rs=Server.CreateObject("ADODB.Recordset")
      rs.Open "SELECT * from member where ID='"& noID &"'", conn
      if err<>0 then
    response.write("No data!")
  else



Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
0
Comment
Question by:rarilo
[X]
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
3 Comments
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 140 total points
ID: 10697755
>>how to change string to long int? or array to long int?

CLong()

Is the attribute ID string or int. If it is of type int or long int.. you should not put ''

 rs.Open "SELECT * from member where ID="& noID &"", conn
0

Featured Post

How to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

715 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