Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2004, 03:22 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL QUERY !!!

Hello friends,

I have a little doubt on sql query. Iam using MS Access table. In table, I have a field called 'franchise' with datatype Yes/No(check box). i want to retrive records where franchise equal to true(or yes). how do we write the query for that? i have tried several ways but it did not work. here are some i tried:

SELECT * FROM EMAILcontacts WHERE franchise=1
SELECT * FROM EMAILcontacts WHERE franchise=True
SELECT * FROM EMAILcontacts WHERE franchise=Yes

the error is :
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.

with regards,
Joseph.

 
Old October 5th, 2004, 09:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

BTW, are you using access 2000?

You should be able to use the last two of your queries. That works perfect. Also found something strange. Try with -1 for YES and 0 for NO. Normally 1 is used instead of YES and 0 for NO. But in 2000, this is how it works. Not sure if Mircosoft has changed that in 2000.

SELECT * FROM EMAILcontacts WHERE franchise=True
   or
SELECT * FROM EMAILcontacts WHERE franchise=Yes
    or
SELECT * FROM EMAILcontacts WHERE franchise=-1

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old October 9th, 2004, 12:22 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Vijay

joseph







Similar Threads
Thread Thread Starter Forum Replies Last Post
sql query i need seearam MySQL 7 November 30th, 2008 03:14 AM
Output Query to txt file from SQL Query everest SQL Server 2005 4 November 22nd, 2007 01:49 AM
SQL Query!! dpkbahuguna Beginning VB 6 5 October 12th, 2007 12:39 AM
Help with SQL query sattaluri Access 2 August 11th, 2006 09:26 AM
SQL query PinkyCat Classic ASP Databases 3 March 11th, 2005 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.