Well, unfortunately, no, because I'm doing a bulk insert and need to return all newly created idents.
However, I think I've over-come the issue by reselecting back from the table I've inserted into.
Now, I have an ActiveX question:
I've been looking at the stuff on sqldts.com, and I want to use ActiveX to control the workflow conditions of a single task. I only want the task to execute if there's data in a table - how do I do that? Here's what I have so far:
Function Main() Dim oRS ' Build new SQL Statement sSQLStatement = "SELECT * FROM source_cats_import1" ' Now, magically the SQL statement executes, and... ' Check we have some records in our Recordset If oRS.Value.BOF Then ' No records found, stop workflow Main = DTSStepScriptResult_DontExecuteTask Else ' We have records so continue Main = DTSStepScriptResult_ExecuteTask End If Set oRS = Nothing End Function
I think this will work, but I don't know how to execute SQL from ActiveX. Can anyone give me suggestions?