Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

serch in database which have numeric column

Posted on 2011-02-24
3
Medium Priority
?
281 Views
Last Modified: 2012-05-11
in my tabe i have numeric  column type    it is number
when i use sql  Qerny
  sqlstr = "SELECT * FROM tbl WHERE  num  ='" & TextBox7.Text & "'"

Open in new window

when i click button give my msg problem ("deffrent type)
it can complet serch

i use visal basic 2005  and accssess
"
0
Comment
Question by:ziayd2009
3 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 34975615
sqlstr = "SELECT * FROM tbl WHERE  num  ='" & CInt(TextBox7.Text) & "'"
0
 
LVL 23

Accepted Solution

by:
wdosanjos earned 200 total points
ID: 34976874
Try:

sqlstr = "SELECT * FROM tbl WHERE  num  =" & TextBox7.Text

Open in new window

0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 34978765
try:-
sqlstr = "SELECT * FROM tbl WHERE  num  =" & Val(TextBox7.Text)

Open in new window


0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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