May 18, 2009 at 7:37 am
I am looking for example on how to open database conn and write to it in Script Task.
May 18, 2009 at 9:12 am
For a simple data flow operation, you don't need to script it; you can use the OleDB Destination to write data to your SQL Server database.
hth,
Tim
Tim Mitchell
TimMitchell.net | @tmitch.net | Tyleris.com
ETL Best Practices
May 18, 2009 at 12:38 pm
I have script task that does data validation and manipulation using custom dll's and i need to store data into database after data validation. It has to be in script task. I just need to insert data into database in Script Task.
May 18, 2009 at 5:37 pm
One option is to:
1. Create an ADO.NET Connection Manager named "MySQLConnMgr"
2. In your Script Task have something like:
Dim oConn As System.Data.SqlClient.SqlConnection = DirectCast(Dts.Connections("MySQLConnMgr").AcquireConnection(Nothing), System.Data.SqlClient.SqlConnection)
'TODO: Use the connection
If oConn IsNot Nothing Then
Dts.Connections("MySQLConnMgr").ReleaseConnection(Nothing)
End If
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply