Friday, March 30, 2012
it's very urgent regarding XP_SEND MAIL
I have a problem in sending mail from sql server 2000 which is using
windows 2000 professional and outlook express
Iam pasting my code below
/
************************************************** ************************************************** ********
Create procedure Pub_SendingMail
as
declare
@.EmailAddTO varchar(30),
@.EmailSubject varchar(130),
@.EmailText varchar(255),
@.return int,
@.Counting int
@.
begin
/* SET value */
set @.return = 0
set @.Counting = 0
set @.EmailSubject = 'TEST EMAIL'
set @.EmailText = 'This is a test email'
set @.EmailAddTO = 'nagesh@.emids.com'
/* LOOP. If e-mail is sent, break loop; ELSE WAIT 10 seconds, and
then RETRY. */
WHILE 1=1
begin
set @.Counting = @.Counting + 1
exec @.return = master.dbo.xp_sendmail
@.recipients = @.EmailAddTO,
@.message = @.EmailText ,
@.subject = @.EmailSubject
@.attachments = 'c:\attachment.txt'
/* CHECK value, break if SUCCESS */
if @.return = 0
begin
print 'EMAIL SENT'
break
end
else
begin
/* Try 1 times */
if @.Counting = 1
break
print 'EMAIL FAILED, WAIT 10 SECONDS, TRY AGAIN'
/*000 hours, 00 minutes, and 10 seconds */
waitfor delay '000:00:03'
end
end
end
************************************************** ************************************************** *************/
and when iam executing
EXEC Pub_SendingMail
it is giving the following error
Server: Msg 18030, Level 16, State 1, Line 0
xp_sendmail: Either there is no default mail client or the current
mail client cannot fulfill the messaging request. Please run Microsoft
Outlook and set it as the default mail client.
but here i need to send mail not only to out look express but also
general mail servers
I would deeply appriciate if any body can help me about this issue
and send any modifications in the above code.And also how to configure
the Microsoft Outlook Express as the default mail client.
it is very very very very very urgent
Regards
prasad
You'll need to set up a MAPI mail profile for this to work. Alternatively
you could use the XPSMTP.DLL which is free
(http://www.sqldev.net/xp/xpsmtp.htm).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
it's very urgent regarding XP_SEND MAIL
I have a problem in sending mail from sql server 2000 which is using
windows 2000 professional and outlook express
Iam pasting my code below
/
************************************************************************************************************
Create procedure Pub_SendingMail
as
declare
@.EmailAddTO varchar(30),
@.EmailSubject varchar(130),
@.EmailText varchar(255),
@.return int,
@.Counting int
@.
begin
/* SET value */
set @.return = 0
set @.Counting = 0
set @.EmailSubject = 'TEST EMAIL'
set @.EmailText = 'This is a test email'
set @.EmailAddTO = 'nagesh@.emids.com'
/* LOOP. If e-mail is sent, break loop; ELSE WAIT 10 seconds, and
then RETRY. */
WHILE 1=1
begin
set @.Counting = @.Counting + 1
exec @.return = master.dbo.xp_sendmail
@.recipients = @.EmailAddTO,
@.message = @.EmailText ,
@.subject = @.EmailSubject
@.attachments = 'c:\attachment.txt'
/* CHECK value, break if SUCCESS */
if @.return = 0
begin
print 'EMAIL SENT'
break
end
else
begin
/* Try 1 times */
if @.Counting = 1
break
print 'EMAIL FAILED, WAIT 10 SECONDS, TRY AGAIN'
/*000 hours, 00 minutes, and 10 seconds */
waitfor delay '000:00:03'
end
end
end
*****************************************************************************************************************/
and when iam executing
EXEC Pub_SendingMail
it is giving the following error
Server: Msg 18030, Level 16, State 1, Line 0
xp_sendmail: Either there is no default mail client or the current
mail client cannot fulfill the messaging request. Please run Microsoft
Outlook and set it as the default mail client.
but here i need to send mail not only to out look express but also
general mail servers
I would deeply appriciate if any body can help me about this issue
and send any modifications in the above code.And also how to configure
the Microsoft Outlook Express as the default mail client.
it is very very very very very urgent
Regards
prasadXp_sendmail cannot use Outlook Express. Do yourself a big favor and use xp_smtp_sendmail from
www.sqldev.net.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<shyam.yarlagadda@.gmail.com> wrote in message
news:1170414875.690570.8220@.v45g2000cwv.googlegroups.com...
> Hi,
> I have a problem in sending mail from sql server 2000 which is using
> windows 2000 professional and outlook express
> Iam pasting my code below
> /
> ************************************************************************************************************
> Create procedure Pub_SendingMail
> as
> declare
> @.EmailAddTO varchar(30),
> @.EmailSubject varchar(130),
> @.EmailText varchar(255),
> @.return int,
> @.Counting int
> @.
> begin
> /* SET value */
> set @.return = 0
> set @.Counting = 0
> set @.EmailSubject = 'TEST EMAIL'
> set @.EmailText = 'This is a test email'
> set @.EmailAddTO = 'nagesh@.emids.com'
> /* LOOP. If e-mail is sent, break loop; ELSE WAIT 10 seconds, and
> then RETRY. */
> WHILE 1=1
> begin
> set @.Counting = @.Counting + 1
> exec @.return = master.dbo.xp_sendmail
> @.recipients = @.EmailAddTO,
> @.message = @.EmailText ,
> @.subject = @.EmailSubject
> @.attachments = 'c:\attachment.txt'
> /* CHECK value, break if SUCCESS */
> if @.return = 0
> begin
> print 'EMAIL SENT'
> break
> end
> else
> begin
> /* Try 1 times */
> if @.Counting = 1
> break
> print 'EMAIL FAILED, WAIT 10 SECONDS, TRY AGAIN'
> /*000 hours, 00 minutes, and 10 seconds */
> waitfor delay '000:00:03'
> end
> end
> end
> *****************************************************************************************************************/
> and when iam executing
> EXEC Pub_SendingMail
> it is giving the following error
> Server: Msg 18030, Level 16, State 1, Line 0
> xp_sendmail: Either there is no default mail client or the current
> mail client cannot fulfill the messaging request. Please run Microsoft
> Outlook and set it as the default mail client.
> but here i need to send mail not only to out look express but also
> general mail servers
> I would deeply appriciate if any body can help me about this issue
> and send any modifications in the above code.And also how to configure
> the Microsoft Outlook Express as the default mail client.
> it is very very very very very urgent
> Regards
> prasad
>|||You'll need to set up a MAPI mail profile for this to work. Alternatively
you could use the XPSMTP.DLL which is free
(http://www.sqldev.net/xp/xpsmtp.htm).
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
Monday, March 19, 2012
Issues in SSRS
I need some inputs regarding the
following points related to the SSRS reports:
1. We have a table in
the report and we want to change the display order of the columns when
downloading the report in the CSV format. What could be the possible approach
for this?
2. How to set bookmarks for a report when
downloading the report in the PDF format?
3. We have a table in the report and we
are hiding few cells of the table based on some condition. Now when a particular
cell is made invisible, a blank space exists at the location of that cell. The
requirement is that if we hide one cell, the cell below it must shift above i.e
at the location of the hidden cell.
In SSRS if we hide one row of a table,
then the row below it automatically shifts upwards, but this is not applicable
for a table cell.
Could anyone please provide vaulable
feedback on these points?
Thanks,
S Suresh
1. Not possible
2. Yes, you can create bookmarks for groups in your report by using "Document map label" feature when you edit the group.
3. Instead of having different cells in a row, merge all the cells and then have a rectangle inside that merged cell and then have multiple textboxes inside the rectangle in the same positions as cells were before. When you control the visibility of these textboxes inside a rectangle, they will move up if the visibility of the above cell is hidden.
Shyam
Monday, February 20, 2012
Issue charting data over last 24 hours...
I have a table which contains data regarding calls to the Help Desk, I want to chart this using a simple line chart in SSRS 2005 with the chart displaying the number of cases opened by the help desk each hour for the last 24 hours. Although our Help Desk provides 24/7 support, there are periods of an hour in which no calls are received. The issue I'm having is I want the chart to still display these hour periods of time even though there are no records created in the time span. I want the x-axis to display every hour for the last 24 hours.
Anyone have any suggestion on how I can accomplish this? The only idea I've come up with is creating a new table containing a list of every hour in a day and referencing this to build the x-axis...but it seems as though it should be easier than that?
Thanks in advance for any input or assistance.
>>The only idea I've come up with is creating a new table containing a list of every hour in a day and referencing this to build the x-axisI have to do the same thing a lot, except on the calendar level rather than the hour level.
Although maybe it *should* be easier, I don't know a better way to do it.
Because the calendar is a bit more dynamic, I don't store the data in a table but rather generate it on the fly. In your case, it's static (there are always 24 hours) so it makes some sense to just store the data in a table, in the form you need it --
However you *can* generate it on the fly pretty easily if you wish.
Pick some table that always has >= 24 rows for this task -- I'll use master.dbo.spt_values here --
Code Snippet
SELECT TOP 24 ROW_NUMBER() OVER (ORDER BY name) FROM dbo.spt_values
... put this in a table-valued udf, reference the udf in your query...
HTH,
>L<