![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all. I have built a simple ETL package. I have an OLE DB source, which then is multicasted. The first output is pumped into a SQL Server DB and the second one goes into a script destination which runs an UPDATE on the "Source" table setting a flag field to indicate that the records have been read. To do this I have a connection manager which is used for the Ole DB source, and also referenced in my script component where i specifically define a connection and open it etc. Code is below: Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer) Dim conn As OleDb.OleDbConnection conn = New OleDb.OleDbConnection(Me.Connections.Connection.Co nnectionString) conn.Open() Dim sqlCmd As New OleDb.OleDbCommand("Update TEST_CHANGES set CHANGES_EXTRACTED = 'Y' Where CHANGE_ID = " & Row.CHANGEID, conn) sqlCmd.ExecuteNonQuery() conn.Close() End Sub I have also defined the conection string in an XML configuration file, for portability reasons. The problem I have is that although the data is read sucessfully and pumped into my SQL server Destination, the writeback fails with a blank password error. I have read other posts here saying that this can be worked around by using a config file, but I'm already doing that. Please help! |
#3
| |||
| |||
|
|
Hello JasonB, Why not use an OLE DB Cmd Transform? This can exactly what you want. The OLE DB Command Transformation (http://www.sqlis.com/default.aspx?309) Allan Mitchell www.SQLDTS.com www.SQLIS.com www.Konesans.com Hello all. I have built a simple ETL package. I have an OLE DB source, which then is multicasted. The first output is pumped into a SQL Server DB and the second one goes into a script destination which runs an UPDATE on the "Source" table setting a flag field to indicate that the records have been read. To do this I have a connection manager which is used for the Ole DB source, and also referenced in my script component where i specifically define a connection and open it etc. Code is below: Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer) Dim conn As OleDb.OleDbConnection conn = New OleDb.OleDbConnection(Me.Connections.Connection.Co nnectionString) conn.Open() Dim sqlCmd As New OleDb.OleDbCommand("Update TEST_CHANGES set CHANGES_EXTRACTED = 'Y' Where CHANGE_ID = " & Row.CHANGEID, conn) sqlCmd.ExecuteNonQuery() conn.Close() End Sub I have also defined the conection string in an XML configuration file, for portability reasons. The problem I have is that although the data is read sucessfully and pumped into my SQL server Destination, the writeback fails with a blank password error. I have read other posts here saying that this can be worked around by using a config file, but I'm already doing that. Please help! |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hello Jason, I suspect this is caused by multicast. If you only use the script destination with the ole db source, what is the result? Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Hello Allan, I agree with you the buffer is the same. I just want to check if the update to the source table conflicts with read for this OLE DB data source. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Partner Support When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |