Well, let's say that this is your page that returns data:
page.asp:
<html><head><title>something</title></head>
<body>
<%
UserID = 6
Dim oADO, oRS
Set oADO = CreateObject("ADODB.Connection")
Set oRS = oADO.Execute("SELECT COUNT(transID) FROM Trans WHERE UserID=" &
UserID)
%>
You have placed <%=oRS.Fields.Item(0).Value%> orders.
<%
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing
</body>
</html>
To turn that into an e-mail, you'd dump all the html to a variable, i.e.
<%
sBody = "<html><head><title>something</title></head>" & vbCrLf
sBody = sBody & "<body>" & vbCrLf
UserID = 6
Dim oADO, oRS
Set oADO = CreateObject("ADODB.Connection")
Set oRS = oADO.Execute("SELECT COUNT(transID) FROM Trans WHERE UserID=" &
UserID)
sBody = sBody & "You have placed " & oRS.Fields.Item(0).Value & " orders." &
vbCrLf
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing
sBody = sBody & "</body>" & vbCrLf
sBody = sBody & "</html>"
Set oCDO = CreateObject("CDO.Message")
oCDO.From = ""
oCDO.To = ""
oCDO.Subject = "orders"
oCDO.HtmlBody = sBody
oCDO.Send
%>
Does that make sense?
Ray at work
"Dave" <> wrote in message
news:0pH1d.2601$...
> Thanks Ray,
>
> I can build an asp page that shows the data I require to be sent in the
> email , Just about ! 
>
> What do I do next ?
>
> Dave
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:...
>> Do you know how to build a web-page that would display this data? If so,
>> it's the same basic idea, except that instead of writing the html to a
>> browser, you save it to a variable that will become the .HTMLBody of your
>> CDO.Message object (assuming that's what you use).
>>
>> So, forget the e-mailing for a moment, and focus on just creating a web
> page
>> with the data you want. Can you do that?
>>
>> Ray at work
>>
>> "Dave" <> wrote in message
>> news:KAG1d.2253$...
>> >>
>> > Dyanmic in the sense of I want to be able to pull data from sql and
>> > display
>> > it in a formatted html table which in turn is embeded in an email
> message,
>> > basically like when you buy something online and you have a
>> > confirmation
>> > email showing what you ordered, that is what I want to be able to do. I
>> > may
>> > be going completly the wrong way about it due to my ignorance any help
> is
>> > gratefully received
>> >
>> > Dave
>> >
>> >
>>
>>
>
>