email blaster with CDONTS
I have an email blaster written in asp. Everything works fine except this:
Within the asp I have lines like this --
**************************************************
HTML = HTML & "<P>"
HTML = HTML & "Dear "
%>
<% Response.Write rstBlast.Fields("FirstName") %>
<%
HTML = HTML & "<BR><BR>"
HTML = HTML & "Thank you for your recent order..."
**************************************************
I get no errors, but I also get no "FirstName"
Can anyone see what might be the problem here? And maybe make a suggestion
that could save me hours. It would be greatly appreciated.
[659 byte] By [
kyle] at [2007-11-9 17:46:58]

# 1 Re: email blaster with CDONTS
Kyle,
I can't see the rest of your code but from what I see it looks like here
you are building the email into a variable called HTML. The problem is your
adding the first name using the write method of the response object. That
won't insert the first name into the email you are building. It is sending
(or atempting to) the first name to the client.
Add this line to insert the first name...
HTML = HTML & rstBlast.Fields("FirstName")
Response object is used to send data to the client. If you are just populating
variables or what not just concatenate the code like you would a string.
Good luck and let me know if yo have any questions!
Michael
"kyle" <kfinch@bayoucitygroup.com> wrote:
>
>I have an email blaster written in asp. Everything works fine except this:
>
>Within the asp I have lines like this --
>**************************************************
>HTML = HTML & "<P>"
>HTML = HTML & "Dear "
>%>
><% Response.Write rstBlast.Fields("FirstName") %>
><%
>HTML = HTML & "<BR><BR>"
>HTML = HTML & "Thank you for your recent order..."
>**************************************************
>I get no errors, but I also get no "FirstName"
>Can anyone see what might be the problem here? And maybe make a suggestion
>that could save me hours. It would be greatly appreciated.
>
# 2 Re: email blaster with CDONTS
If however, your response.write is simply for your debugging purposes, you
may need to put
<%=rstBlast.Fields("FirstName")%>
^^^
the '=' sign is important in this case; it tells the complier to simply write
the variable out.
Q*bert
@(#$&*
"Michael" <msanchez@runtimewebdev.com> wrote:
>
>Kyle,
>I can't see the rest of your code but from what I see it looks like here
>you are building the email into a variable called HTML. The problem is your
>adding the first name using the write method of the response object. That
>won't insert the first name into the email you are building. It is sending
>(or atempting to) the first name to the client.
>Add this line to insert the first name...
>
>HTML = HTML & rstBlast.Fields("FirstName")
>
>Response object is used to send data to the client. If you are just populating
>variables or what not just concatenate the code like you would a string.
>
>Good luck and let me know if yo have any questions!
>Michael
>
>"kyle" <kfinch@bayoucitygroup.com> wrote:
>>
>>I have an email blaster written in asp. Everything works fine except this:
>>
>>Within the asp I have lines like this --
>>**************************************************
>>HTML = HTML & "<P>"
>>HTML = HTML & "Dear "
>>%>
>><% Response.Write rstBlast.Fields("FirstName") %>
>><%
>>HTML = HTML & "<BR><BR>"
>>HTML = HTML & "Thank you for your recent order..."
>>**************************************************
>>I get no errors, but I also get no "FirstName"
>>Can anyone see what might be the problem here? And maybe make a suggestion
>>that could save me hours. It would be greatly appreciated.
>>
>
Q*Bert at 2007-11-11 23:19:02 >

# 3 Re: email blaster with CDONTS
Okay, now my code reads as follows:
HTML = HTML & "</P>"
HTML = HTML & "<P>Dear "%>
<% =rstBlast.Fields("FirstName") %>
<%
HTML = HTML & ","
HTML = HTML & "</P>"
HTML = HTML & "<P>We appreciate your order..."
I am still unsuccessful with trying to insert the customers name. Would it
be helpful to see more of my code for this page?
Thanks for your help.
"Q*Bert" <luke_davis_76@hotmail.com> wrote:
>
>If however, your response.write is simply for your debugging purposes, you
>may need to put
><%=rstBlast.Fields("FirstName")%>
> ^^^
>
>the '=' sign is important in this case; it tells the complier to simply
write
>the variable out.
>
>Q*bert
>@(#$&*
>"Michael" <msanchez@runtimewebdev.com> wrote:
>>
>>Kyle,
>>I can't see the rest of your code but from what I see it looks like here
>>you are building the email into a variable called HTML. The problem is
your
>>adding the first name using the write method of the response object. That
>>won't insert the first name into the email you are building. It is sending
>>(or atempting to) the first name to the client.
>>Add this line to insert the first name...
>>
>>HTML = HTML & rstBlast.Fields("FirstName")
>>
>>Response object is used to send data to the client. If you are just populating
>>variables or what not just concatenate the code like you would a string.
>>
>>Good luck and let me know if yo have any questions!
>>Michael
>>
>>"kyle" <kfinch@bayoucitygroup.com> wrote:
>>>
>>>I have an email blaster written in asp. Everything works fine except this:
>>>
>>>Within the asp I have lines like this --
>>>**************************************************
>>>HTML = HTML & "<P>"
>>>HTML = HTML & "Dear "
>>>%>
>>><% Response.Write rstBlast.Fields("FirstName") %>
>>><%
>>>HTML = HTML & "<BR><BR>"
>>>HTML = HTML & "Thank you for your recent order..."
>>>**************************************************
>>>I get no errors, but I also get no "FirstName"
>>>Can anyone see what might be the problem here? And maybe make a suggestion
>>>that could save me hours. It would be greatly appreciated.
>>>
>>
>
Kyle at 2007-11-11 23:20:01 >

# 4 Re: email blaster with CDONTS
Looks like you need to do as Michael posted and concatenate the FirstName
Variables to the rest of the message i.e
HTML = HTML & "<P>"
HTML = HTML & "Dear "
HTML = HTML & rstBlast.Fields("FirstName")
HTML = HTML & "<BR><BR>"
HTML = HTML & "Thank you for your recent order..."
providing rstBlast.Fields("FirstName") has value then this should output
with the rest of the message.
KI
"kyle" <kfinch@bayoucitygroup.com> wrote in message
news:3db7ffdd$1@tnews.web.dev-archive.com...
>
> I have an email blaster written in asp. Everything works fine except this:
>
> Within the asp I have lines like this --
> **************************************************
> HTML = HTML & "<P>"
> HTML = HTML & "Dear "
> %>
> <% Response.Write rstBlast.Fields("FirstName") %>
> <%
> HTML = HTML & "<BR><BR>"
> HTML = HTML & "Thank you for your recent order..."
> **************************************************
> I get no errors, but I also get no "FirstName"
> Can anyone see what might be the problem here? And maybe make a suggestion
> that could save me hours. It would be greatly appreciated.
>
KI at 2007-11-11 23:21:02 >

# 5 Re: email blaster with CDONTS
You need to use:
rstBlast.Fields.Item("FirstName").value
^^^^ ^^^^
which is the correct syntax for extracting data from a db.
Hope this helps
Jody
"Kyle" <kfinch@bayoucitygroup.com> wrote in message
news:3db95a60$1@tnews.web.dev-archive.com...
>
> Okay, now my code reads as follows:
>
> HTML = HTML & "</P>"
> HTML = HTML & "<P>Dear "%>
> <% =rstBlast.Fields("FirstName") %>
> <%
> HTML = HTML & ","
> HTML = HTML & "</P>"
> HTML = HTML & "<P>We appreciate your order..."
>
> I am still unsuccessful with trying to insert the customers name. Would it
> be helpful to see more of my code for this page?
> Thanks for your help.
>
> "Q*Bert" <luke_davis_76@hotmail.com> wrote:
> >
> >If however, your response.write is simply for your debugging purposes,
you
> >may need to put
> ><%=rstBlast.Fields("FirstName")%>
> > ^^^
> >
> >the '=' sign is important in this case; it tells the complier to simply
> write
> >the variable out.
> >
> >Q*bert
> >@(#$&*
> >"Michael" <msanchez@runtimewebdev.com> wrote:
> >>
> >>Kyle,
> >>I can't see the rest of your code but from what I see it looks like here
> >>you are building the email into a variable called HTML. The problem is
> your
> >>adding the first name using the write method of the response object.
That
> >>won't insert the first name into the email you are building. It is
sending
> >>(or atempting to) the first name to the client.
> >>Add this line to insert the first name...
> >>
> >>HTML = HTML & rstBlast.Fields("FirstName")
> >>
> >>Response object is used to send data to the client. If you are just
populating
> >>variables or what not just concatenate the code like you would a string.
> >>
> >>Good luck and let me know if yo have any questions!
> >>Michael
> >>
> >>"kyle" <kfinch@bayoucitygroup.com> wrote:
> >>>
> >>>I have an email blaster written in asp. Everything works fine except
this:
> >>>
> >>>Within the asp I have lines like this --
> >>>**************************************************
> >>>HTML = HTML & "<P>"
> >>>HTML = HTML & "Dear "
> >>>%>
> >>><% Response.Write rstBlast.Fields("FirstName") %>
> >>><%
> >>>HTML = HTML & "<BR><BR>"
> >>>HTML = HTML & "Thank you for your recent order..."
> >>>**************************************************
> >>>I get no errors, but I also get no "FirstName"
> >>>Can anyone see what might be the problem here? And maybe make a
suggestion
> >>>that could save me hours. It would be greatly appreciated.
> >>>
> >>
> >
>
Jody at 2007-11-11 23:22:06 >

# 6 Re: email blaster with CDONTS
Kyle,
Did you read my original post?
In addition...Using <% =rstBlast.Fields("FirstName") %> is the EXACT same
as using response.write. You can not use response.write to add the users
name. The response object is sending it to the client or the buffer NOT your
HTML text.
Simply add this...
HTML = HTML & "<P>Dear " & rstBlast.Fields("FirstName")
Good luck and let me know if you have questions.
Michael
msanchez@runtimewebdev.com
"
Kyle" <kfinch@bayoucitygroup.com> wrote:
>
>Okay, now my code reads as follows:
>
>HTML = HTML & "</P>"
>HTML = HTML & "<P>Dear "%>
><% =rstBlast.Fields("FirstName") %>
><%
>HTML = HTML & ","
>HTML = HTML & "</P>"
>HTML = HTML & "<P>We appreciate your order..."
>
>I am still unsuccessful with trying to insert the customers name. Would
it
>be helpful to see more of my code for this page?
>Thanks for your help.
>
>"Q*Bert" <luke_davis_76@hotmail.com> wrote:
>>
>>If however, your response.write is simply for your debugging purposes,
you
>>may need to put
>><%=rstBlast.Fields("FirstName")%>
>> ^^^
>>
>>the '=' sign is important in this case; it tells the complier to simply
>write
>>the variable out.
>>
>>Q*bert
>>@(#$&*
>>"Michael" <msanchez@runtimewebdev.com> wrote:
>>>
>>>Kyle,
>>>I can't see the rest of your code but from what I see it looks like here
>>>you are building the email into a variable called HTML. The problem is
>your
>>>adding the first name using the write method of the response object. That
>>>won't insert the first name into the email you are building. It is sending
>>>(or atempting to) the first name to the client.
>>>Add this line to insert the first name...
>>>
>>>HTML = HTML & rstBlast.Fields("FirstName")
>>>
>>>Response object is used to send data to the client. If you are just populating
>>>variables or what not just concatenate the code like you would a string.
>>>
>>>Good luck and let me know if yo have any questions!
>>>Michael
>>>
>>>"kyle" <kfinch@bayoucitygroup.com> wrote:
>>>>
>>>>I have an email blaster written in asp. Everything works fine except
this:
>>>>
>>>>Within the asp I have lines like this --
>>>>**************************************************
>>>>HTML = HTML & "<P>"
>>>>HTML = HTML & "Dear "
>>>>%>
>>>><% Response.Write rstBlast.Fields("FirstName") %>
>>>><%
>>>>HTML = HTML & "<BR><BR>"
>>>>HTML = HTML & "Thank you for your recent order..."
>>>>**************************************************
>>>>I get no errors, but I also get no "FirstName"
>>>>Can anyone see what might be the problem here? And maybe make a suggestion
>>>>that could save me hours. It would be greatly appreciated.
>>>>
>>>
>>
>
