473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Like query IN vb and access

5 New Member
hi...

I am developing a library application using VB 6.0 As front end and Microsoft Access as Back end.

I want to search by keywords and i have used the following SQL statement in VB

"SELECT * From Daily_Book WHERE Bookname Like' "& Text1.Text & " ' %"

Daily_Book is my table name and Bookname is the column name.
I want to enter the keyword in Text1.Text (say C++) And search all books with C++ in the table Daily_Book

I executed the above code ..it gives me syntax errors......
Please help me..

dolly
Sep 15 '06 #1
3 4021
ADezii
8,834 Recognized Expert Expert
hi...

I am developing a library application using VB 6.0 As front end and Microsoft Access as Back end.

I want to search by keywords and i have used the following SQL statement in VB

"SELECT * From Daily_Book WHERE Bookname Like' "& Text1.Text & " ' %"

Daily_Book is my table name and Bookname is the column name.
I want to enter the keyword in Text1.Text (say C++) And search all books with C++ in the table Daily_Book

I executed the above code ..it gives me syntax errors......
Please help me..

dolly
'This should do it
"SELECT * From Daily_Book WHERE Bookname Like '" & Me![Text1] & "*'"
Sep 16 '06 #2
PEB
1,418 Recognized Expert Top Contributor
Yeah,

It depends which syntax do you use in your database..

ANSI 89 or ANSI 92

ANSI 89 is with *
ANSI 92 is with %

Maybe your VB application was connected to SQL SERVER?

:)
Sep 16 '06 #3
swagata
5 New Member
Thnx every1...the problem got solved...:-)
Sep 20 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jahmil Richardson | last post by:
Attempting to query MS Access database with the ODBC drivers for PHP. When using the LIKE statement no records are returned. Example: $query = " Select * From Dispatch Where Customer Like...
3
by: SkunkDave | last post by:
Having this description column in a table "Cookies, peanut butter sandwich, regular" When using this WHERE clause: WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); I...
3
by: Robert | last post by:
I am having performance issues on a SQL query in Access. My query is accessing and joining several tables (one very large one). The tables are linked ODBC. The client submits the query to the...
3
by: Joerg Glissmann | last post by:
Hi there, is there a way to link an Access XP database to a query in a different database (Access XP as well) like you can do with tables? My front ends need to operate on different data...
11
by: Randy Weber | last post by:
I am getting unexpected results with a Like Query using ASP and an Access database. This query - SELECT PN, Qty From Inventory Where PN Like 'SSW-10%'; returns what I expect: PN ...
1
by: Dman | last post by:
MS Access 2002 - query form control returns funny symbols like I am running an append query on a form. Access is having trouble with the calculated fields and comboboxes. Example – referring...
5
by: jason.evans | last post by:
Hi there. I am having an intrigueing problem. I have a query which left joins another query to itself twice. The original query is derived from a linked table in SQLServer 2000. When I run...
1
by: Kerr | last post by:
Hi all, I am writing a simple app to query a microsoft access 2000 databse in asp.net. Nothing complicated, but I am writing some inline SQL to query a table with a LIKE clause in it (i.e....
2
by: Michael C | last post by:
Hi all. When I run the following query against my Access database - from within Access - it returns the correct results (5 records in this instance): SELECT * FROM WHERE = "Clothes" AND LIKE...
8
by: Roland Hall | last post by:
In Access you use "*" + + "*", + can be replaced with & Calling a parameterized query in Access requires % be used in place of *, however, all that I have read show dynamic SQL passed to Access: ...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.