Solved

ASP string to long int?

Posted on 2004-03-28
3
249 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 35 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

739 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