473,388 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

find in database

Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam")

In this syntax is doesn't work, is there a way to do this??

Greetings Henk
Jul 17 '05 #1
6 6246
Find does not support AND / OR operators:
http://www.devguru.com/Technologies/...dset_find.html

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--

"Henk Salomons" <sa******@planet.nl> wrote in message
news:d0**********@reader11.wxs.nl...
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam")

In this syntax is doesn't work, is there a way to do this??

Greetings Henk

Jul 17 '05 #2
Find does not support AND / OR operators:
http://www.devguru.com/Technologies/...dset_find.html

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--

"Henk Salomons" <sa******@planet.nl> wrote in message
news:d0**********@reader11.wxs.nl...
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam")

In this syntax is doesn't work, is there a way to do this??

Greetings Henk

Jul 17 '05 #3
Rob
"Henk Salomons" <sa******@planet.nl> wrote in news:d0nlva$jgn$1
@reader11.wxs.nl:
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam")

In this syntax is doesn't work, is there a way to do this??

Greetings Henk


Well Henk you can set a SQL string with an 'AND' operator in it:

Dim strSQL as String
strSQL = "SELECT * FROM MyTable WHERE Collum1 = 'London' AND Collum2 =
'Amsterdam'"

Once you've set the strSQL variable, the exact method of passing the
string and obtaining the data will vary according to the data object you
are using.
Jul 17 '05 #4
Rob
"Henk Salomons" <sa******@planet.nl> wrote in news:d0nlva$jgn$1
@reader11.wxs.nl:
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam")

In this syntax is doesn't work, is there a way to do this??

Greetings Henk


Well Henk you can set a SQL string with an 'AND' operator in it:

Dim strSQL as String
strSQL = "SELECT * FROM MyTable WHERE Collum1 = 'London' AND Collum2 =
'Amsterdam'"

Once you've set the strSQL variable, the exact method of passing the
string and obtaining the data will vary according to the data object you
are using.
Jul 17 '05 #5

"Henk Salomons" <sa******@planet.nl> ha scritto nel messaggio
news:d0**********@reader11.wxs.nl...
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam"), 0,
adSearchForward, adBookmarkFirst

In this syntax is doesn't work, is there a way to do this??

Greetings Henk

Try this (note apostrophes around town names):

Db.recordset.find("Collum1='London' AND Collum2='Amsterdam'"), 0,
adSearchForward, adBookmarkFirst

Bye
Elef
Jul 17 '05 #6

"Henk Salomons" <sa******@planet.nl> ha scritto nel messaggio
news:d0**********@reader11.wxs.nl...
Question,

Is it possible to use a AND in a find string, somthing like this:
Db.recordset.find("Collum1=London AND Collum2=Amsterdam"), 0,
adSearchForward, adBookmarkFirst

In this syntax is doesn't work, is there a way to do this??

Greetings Henk

Try this (note apostrophes around town names):

Db.recordset.find("Collum1='London' AND Collum2='Amsterdam'"), 0,
adSearchForward, adBookmarkFirst

Bye
Elef
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Galsaba | last post by:
Anyone knows how I can find a script for "Find a Dealer near you" locator script? I prefer to have it in two stages: 1. The customer will enter his address, and then the result will be a list of...
1
by: Richard Bailey | last post by:
Greetings. Today I was testing the sql backup/restore functions on our primary server. I was able to backup my database without any problems but when I tried to restore it, I received an error...
11
by: JoshuaF | last post by:
hello everyone i am very new to postgresql 7.3.3 and am using it on my mac G4 OS X and i am having some trouble which i hope you can help me out with some answers to my questions: 1.) How can I...
10
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
8
by: Joe | last post by:
I need an Access application that can search dealers from my dealer list, in a 30 miles distance from the user. You may see many applications like this on the web if you search under "find a...
1
by: TheScullster | last post by:
Hi all Bit of an obscure one this, but hopefully someone will be able to help. 4 years ago we had a potentially catastrophic problem with our Access database. From memory it was written in...
1
by: marcnz | last post by:
I have been charged of creating a coldfusion web site for our company. Our database has a ms sql 2005 backend and ms access frontend. Almost all tables are linked tables with the SQL database,...
0
by: nimjerry | last post by:
i am using db2 udb V 9 on aix 5.3 and in db2diag.log alwas has this error occurr below is sample message 2008-03-03-09.45.34.366406+420 I306667A443 LEVEL: Warning PID : 835622 ...
3
by: Larry Leonard | last post by:
Running MSDE 2000 SP2 on Windows XP SP3. I have a T-SQL script that is relatively simple (adding constraints, inserting rows, etc.) and short (maybe 300 lines, heavily commented). It's an...
3
by: Payne | last post by:
Hello, I'm having trouble figuring out how to best explain my problem but I hope I can make myself clear enough. Anyway, I'm doing an assignment for school and in this one we're supposed to write a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.