Solved

serch in database which have numeric column

Posted on 2011-02-24
3
273 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 50 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

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

12 Experts available now in Live!

Get 1:1 Help Now