Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 M_Sex problem
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 19 March 2005 :  10:36:36  Show Profile
Hi,

For some reason the following code will note pick up only members that have M_SEX = Male
===================================================================
'## Forum_SQL - Find all records with the search criteria in them
strSql = "SELECT " &strMemberTablePrefix & "MEMBERS.M_SEX, "&strMemberTablePrefix & "MEMBERS.M_HANDLE, "&strMemberTablePrefix & "MEMBERS.M_FIRSTNAME, " &strMemberTablePrefix & "MEMBERS.M_LASTNAME, "&strMemberTablePrefix & "MEMBERS.M_COMMENTS "
strSql = strSql & " FROM " &strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_SEX = Male "
strSql = strSql & "ORDER BY " & strMemberTablePrefix & "MEMBERS.M_SEX ASC"
===================================================================

If I remove the where line the report will fine.

What is wrong ??

I've I query the database via sql :

SELECT FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_SEX
FROM `Z:\phil\leamington`.FORUM_MEMBERS FORUM_MEMBERS
WHERE (FORUM_MEMBERS.M_SEX='Male')

There is no problems.

Can anyone help.

Phil

chumbawumba
Junior Member

United Kingdom
304 Posts

Posted - 19 March 2005 :  11:13:03  Show Profile
don't you need delimiters (') like in your second example?

strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_SEX = 'Male' "
Go to Top of Page

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 19 March 2005 :  11:44:05  Show Profile
Thanks how come if you do = 0 you dont need '0'

Phil
Go to Top of Page

withanhdammit
Junior Member

USA
236 Posts

Posted - 19 March 2005 :  14:12:36  Show Profile  Visit withanhdammit's Homepage  Send withanhdammit an ICQ Message
Probably the difference between an integer and a string value.

h

I reject your reality and substitute my own.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 19 March 2005 :  19:42:19  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by withanhdammit

Probably the difference between an integer and a string value.


Certainly!


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.63 seconds. Powered By: Snitz Forums 2000 Version 3.4.07