Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 12:43:47 PM.
o> Thank you very much for your reply Sir. Here is the script in
o> VBscript which calls Blat.
Ok, so it is VBscript (which I don't know, btw :-)
It looks like you are calling Blat.exe. Did you know there is a .dll
version. That may be a better option for you.
Looking at your Do While loop, can you explain what is going on? Or
correct me?
strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the file
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in emails... :-)
I am guessing here, but how big are your variables in chars? Blat
being a command line app is limited by the number of chars on the
command line (something like 256?). I am guessing that this is your
problem now, not your code or Blat.
I can't tell you how to resolve this in VBScript, but I can send you
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it sounds like
it may be an issue with the code passing info to Blat. Not clear
what language you are using though.
o> '====================================================================
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object extents exceed
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
o> (example:
o> ' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE (example: INDEX
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '====================================================================
o> Option Explicit
o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject, objShell,
o> intMailCounter, strSend
o> arrRecpts = Array("***@vp.com", "***@vp.com")
o> msgSubject = """Automated Message - Get Extents"""
o> Set objConn = CreateObject("ADODB.Connection")
o> objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"
o> Set objRS = objConn.Execute("Select * from get_extents where
extent_id >>= 25 order by extent_id desc")
o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time & "</b><br>"
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>Ow
o> ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"
o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value & "</td>"
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop
o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If
o> WScript.Quit
o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject("WScript.Shell")
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
o> (intMailCounter) & " -s " & msgSubject & " -body " & msgBodyHTML
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57 AM.
o> Please forgive my ignorance, but how do I use this new blat.cpp
o> file?
I believe it is a source code file. ie, it has not been compiled
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I wrote a
o> script that sends an email message to my boss reporting on the
o> size
o> of extents for tables in our production database. It only works
o> when I use a where clause in the query to limit the number of
o> rows
o> returned (extent_id >= 25). Any more rows than that and it won't
o> send the data in the html table, it just puts all the html text
o> and
o> data in the message (and is probably missing a lot because it's
o> too
o> big.) I am using the exec method of the wscript object to
o> return a
o> command window, but I think the buffer is too small for the
o> whole
o> file. Any comments will be greatly appreciated. Thanks, Debra
Are you thinking it is a Blat issue? At first read it sounds like
o> it
may be an issue with the code passing info to Blat. Not clear what
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
o> Community email addresses:
o> Post message: ***@yahoogroups.com
o> Subscribe: blat-***@yahoogroups.com
o> Unsubscribe: blat-***@yahoogroups.com
o> List owner: blat-***@yahoogroups.com
o> Shortcut URL to this page:
o> http://groups.yahoo.com/group/blat
o> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
--
***@Musson.net
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Why get even, when you can get odd?