If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Need a little help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-17-03, 19:25
ikea2y4 ikea2y4 is offline
Registered User
 
Join Date: Oct 2003
Posts: 2
Question Need a little help

Hi,

First time here. Looks quite nice. I have a little problem with something. I'm trying to send out e-mails using Persits Email Component. I have an access database with a row called (Email) and several emails inside of it (About 10 emails). How to i form my SQL Query and what should i do so that when i get to this

Code:
	Set Mail = Server.CreateObject("Persits.MailSender")
	Mail.AddAddress EmailList
It send the email to everybody that had an email in that row. Thanks for any help provided, very much appreciated.
Reply With Quote
  #2 (permalink)  
Old 10-21-03, 11:17
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Depending on whether that email field is NULL or just empty (I can't remember if Access has NULL fields or not) then your SQL would look like:

(If using NULL for blank fields)
SELECT * FROM myTable WHERE Email != NULL

(If using empty fields)
SELECT * FROM myTable WHERE Email != ''

myTable is the name of the table with the Email field and '' are two 'single quotes'

If all you want is the email address in the recordset, replace "*" with "Email"
__________________
That which does not kill me postpones the inevitable.

Last edited by Seppuku; 10-21-03 at 11:21.
Reply With Quote
  #3 (permalink)  
Old 10-21-03, 11:28
sundialsvcs sundialsvcs is offline
Registered User
 
Join Date: Oct 2003
Posts: 706
Exclamation

Quote:
Originally posted by Seppuku
Depending on whether that email field is NULL or just empty (I can't remember if Access has NULL fields or not) then your SQL would look like:

(If using NULL for blank fields)
SELECT * FROM myTable WHERE Email != NULL
Yes, MS-Access does support NULLs. And I think you'll find that it won't accept != NULL.

I think you'll find it wants IS NOT NULL.

Because NULL denotes "the absence of a value" it plays by some special rules.
__________________
ChimneySweep(R): fast, automatic
table repair at a click of the
mouse! http://www.sundialservices.com
Reply With Quote
  #4 (permalink)  
Old 10-21-03, 12:02
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
my bad... I stand corrected... haven't had to query for nulls (or lack thereof) in some time...
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #5 (permalink)  
Old 10-21-03, 16:35
ikea2y4 ikea2y4 is offline
Registered User
 
Join Date: Oct 2003
Posts: 2
Thank you very much works like a charm !
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On