Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Thursday, March 22, 2012

EMail Task Problem

I have a pretty simple process that copies some files from an AS400 to a directory on the same server where my sql 2005 instance lives. I then use an email task to send these files to a client.

However, the email task does not work. I get the following message:

[Send Mail Task] Error: Either the file "BYNSOSR1;BYNSOSR2;BYNSOSR3;BYNSOSR4;BYNSOSR5;BYNSOSR6;BYNSOSR7" does not exist or you do not have permissions to access the file.

Well, the files definitely exist where they are supposed to be so I guess it's a permissions error. However, I have no clue which user would need permissions on that directory. As a test, I gave everyone read permissions and still got this error.

Any suggestions about which user I need to allow read access to the directory where these files exist?

Thanks in advance for any info.

I should say the path info in the previous post was changed so as not to reveal path info. But, the files do indeed exist where the email task expects them to be. I wrote a vb.net app that can email the files from that location just fine using the SMTP client of the .net.mail object hierarchy.|||Well, I never could figure out why the send email task wasn't working. It must have been some sort of permissions issue. I solved the problem by writing a console app in vb.net that sends the email via the net.mail smtpclient. I then run the console app as a execute process task. That sent the email with no problems and was a perfectly adequate way to solve the problem.

Sunday, February 26, 2012

else 0 in a table

Hi,
Is it possible to display 0 in a table?
i have a table that drills down into Region and say for instance when
a region has no sales for that day i would like it to show as 0 not
not show on the report in crystal i would simply use a else 0 anynow
know how to achieve this in SQL reporting?
cheersOn Jun 12, 9:52 am, blueboy <matt_me...@.hotmail.com> wrote:
> Hi,
> Is it possible to display 0 in a table?
> i have a table that drills down into Region and say for instance when
> a region has no sales for that day i would like it to show as 0 not
> not show on the report in crystal i would simply use a else 0 anynow
> know how to achieve this in SQL reporting?
> cheers
If I am understanding you correctly, you should be able to include an
'if' statement as the expression for the cell/column you want to show
zero. Something like this should work:
=iif(Fields!Sales.Value is nothing or Len(CStr(Fields!Sales.Value)) <
1, 0, Fields!Sales.Value)
This basically says: if Sales is null/blank, return 0, else return the
Sales value.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Many thanks will give this a shot right now :-)|||Enrique
in my detail Row i have
Region Sales
=count(Fields!Region.Value) =SUM(Fields!Sales.Value)
i have 4 regions 1-4 what i want is it to show regions 1-4 even when
no sales have been done for that day. I have tried the above but it
doesnt seem to work and just returns the same value for the 2 regions
that have done sales and nothing for the 2 that have not.
i have used different variations of below in the column expression and
the detail expression
=iif(count(Fields!ARN.Value) is nothing or Len(CStr(count(Fields!
ARN.Value))) <
1, 0, Fields!ARN.Value)
Please can you point out where im going wrong?
Many Many thanks in advance

Wednesday, February 15, 2012

Editing User Defined Data type

Is there an easy way to edit an existing User Defined Data type ? For instance i have a custom data type address of base type nvarchar with a length of 40, I want to increase this custom data types length to 50, is there a way to do it or is it even supported?

The SQL Server 2005 Mangement Studio does not allow you do it..is there a work around for this?

Thanks,

Krishna

There is no easy way to do this without dropping and recreating the user-defined data type. You can do this via TSQL. I do not know about the GUI. You might want to ask this question in the SQL Server Tools forum.|||

Thanks, its the same with GUI, its not editable, it just allows us to either delete them and re-create them. Also before deleting them it makes us to remove all references, so its a bit of work..

Regards,

Krishna