Solved

ASP string to long int?

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

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

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.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
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 dynamically set the form action using jQuery.

623 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