Solved

serch in database which have numeric column

Posted on 2011-02-24
3
277 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
[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 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 68
Isolation level in SQL server 3 54
Help  needed 3 43
SQL Need to calculate age from DOB, no stored procedures or functions allowed 10 53
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 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