Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Event Handlers #1

Open
fpvmorais opened this issue Jun 9, 2017 · 0 comments
Open

Improve Event Handlers #1

fpvmorais opened this issue Jun 9, 2017 · 0 comments

Comments

@fpvmorais
Copy link
Owner

Doing it like this seems 'hacky':

DtsEventHandler ev = (DtsEventHandler)loadDefault.EventHandlers.Add("OnError");
TaskHost auditError = (TaskHost)ev.Executables.Add("Microsoft.ExecuteSQLTask");
auditError.Properties["Name"].SetValue(auditError, "Audit Error");
auditError.Properties["Connection"].SetValue(auditError, database.Name);
(auditError.InnerObject as ExecuteSQLTask).SqlStatementSource = "EXECUTE etl.ExtractionAuditSetError ?";
(auditError.InnerObject as ExecuteSQLTask).ParameterBindings.Add("0", "User::LoadId", OleDBDataTypes.NVARCHAR);
fpvmorais pushed a commit that referenced this issue Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant