Solved

ASP string to long int?

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Uploading files to the web server has become common part of almost any kind of web application. People use different technologies to solve this, but regardless of the technology used, it is always useful to have some kind of progress indicator shown…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now