April 2, 2009 at 8:11 am
Can you post the exact error message that you are getting when executing the package?
And also check if the query returns any rows.
--Ramesh
April 2, 2009 at 8:19 am
I have the SQL Task connected to SendMail Task
The package does not excute, it fails and says:
Nonfatal errors occured while saving the package
The connection "SmtpServer=" not found.
This error is thrown by Connections collection when the specific connection element is not found
When I run the SQL in SQL Management Studio, I get the correct result.
I get the SMTP server name
April 2, 2009 at 8:40 am
A Little Help Please (4/2/2009)
I have the SQL Task connected to SendMail TaskThe package does not excute, it fails and says:
Nonfatal errors occured while saving the package
The connection "SmtpServer=" not found.
This error is thrown by Connections collection when the specific connection element is not found
When I run the SQL in SQL Management Studio, I get the correct result.
I get the SMTP server name
Can you add a break point at Send Mail Task and see the result of the package variable?
--Ramesh
April 2, 2009 at 8:51 am
That does not work
Soon as I hit the Run button the error comes put, the packages does not run at all
April 2, 2009 at 8:57 am
Can you add a print screen of the Send Mail Task Expression Editor?
--Ramesh
April 2, 2009 at 9:07 am
This is driving me mad...:crying:
Do I need to add anything into Parameter Mapping within SQL Task Editor?
Image attched
April 2, 2009 at 9:15 am
A Little Help Please (4/2/2009)
This is driving me mad...:crying:Do I need to add anything into Parameter Mapping within SQL Task Editor?
Image attched
Have you checked the Expression Evaluated Value? It reads "SmtpServer="SmtpServer="+@[User::SMTPConnection], this could be the problem cause.
You don't need any parameter mappings, there are used when you're query is using parameters (i.e. ?)
--Ramesh
April 2, 2009 at 9:25 am
Its like the SendMail tak is trying to run before the SQLTask has managed to pick up the variable from the SQL Table.
Are we using the correct exspression
April 2, 2009 at 9:32 am
The final expression should look like "SmtpServer=xxx.xxx.xxx.xxx"
--Ramesh
April 2, 2009 at 9:48 am
Ramesh,
This process we have used we have created the variable but have we declared/save them?
April 2, 2009 at 9:55 am
A Little Help Please (4/2/2009)
Ramesh,This process we have used we have created the variable but have we declared/save them?
Well, let me see the package variables list print screen (Right click on control flow > Variables), make sure the scope of the variable is available...
--Ramesh
April 2, 2009 at 10:06 am
I have also included the error message
April 2, 2009 at 10:18 am
A Little Help Please (4/2/2009)
I have also included the error message
Now I see what is the problem!! It was my bad that I was suggesting to set incorrect property, that's because I didn't had any coffee today and its already late here.:-D:-D
I was intended to set the "SmtpServer" property of the SMTP Connection.
Revised Steps
1. Go to "Send Mail Task Mail Editor"
2. Select "New Connection" from "SmtpConnection" property, type in the values for all the properties.
3. Now go to "Connection Managers" > Go to properties of the newly added SMTP Connection
4. Go to "Expressions" > Select the property "SmtpServer" and select the variable
Now this should work, otherwise I'm out of this thread now...:hehe::hehe:
--Ramesh
April 3, 2009 at 1:23 am
Nope still not working!!! Same errors!!!
I think the Expression is incorrect:
"SmtpServer="+@[User::SMTPConnection]
April 3, 2009 at 1:30 am
Looking back at your first steps:
1. Create 1 OLEDB SQL Connection
2. Drag 1 Execute SQL Task to Control Flow
3. In Execute SQL Task General Properties, Set Resultset = "Single row", Select the Connection, Set SQLSourceType = "Direct Input" and SQLStatement = "SELECT AccountSMTPServer FROM tblSendMail"
4. In Execute SQL Task Resultset Properties, Set Result Name = "0" and select the package variable to which you want the column data.
Point number 4 the following are the settings i have selected:
Container: Package
Name: SMTPConnection
Namespace: User
Value Type: String
Value: Left Empty
Is this correct?
Viewing 15 posts - 16 through 30 (of 37 total)
You must be logged in to reply to this topic. Login to reply