Hejsa!!
Jeg er ved at lave noget i et SSIS flow, men får en fejl og synes min kode er korrekt.
Trykker jeg properties på mit projekt står der den kører .net 2.0 framework - Jeg kan lave den om til 3.5 framework i stedet.
Men kigger jeg properties på min System.data siger den at det er version 2.0
using System.Text;
using System.Data.SqlClient;
using System;
using System.Data;
using System.IO;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
//Declare variables
private string PriceNvarchar;
private int EntryID;
SqlCommand sqlCmd;
SqlConnection sqlConn;
private string SQLDestinationTabel;
private string DestinationDatabase;
IDTSConnectionManager100 connMgr;
public override void AcquireConnections(object Transaction)
{
connMgr = this.Connections.Connection;
sqlConn = (SqlConnection)connMgr.AcquireConnection(null);
}
public override void PreExecute()
{
base.PreExecute();
/*
Add your code here for preprocessing or remove if not needed
*/
}
public override void PostExecute()
{
base.PostExecute();
// Set the Package Variable
Variables.PriceNvarchar = PriceNvarchar;
Variables.EntryID = EntryID;
Variables.SQLDestinationTabel = SQLDestinationTabel;
Variables.SQLDestinationDatabase = DestinationDatabase;
}
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
sqlCmd = new SqlCommand("UPDATE RaptorData.Dbo.VildMedVinCleansedData SET Price ="+ @PriceNvarchar+" where EntryID = "+@EntryID);
}
public override void ReleaseConnections()
{
connMgr.ReleaseConnection(sqlConn);
}
}
Kan i hjælpe??
Jeg er ved at lave noget i et SSIS flow, men får en fejl og synes min kode er korrekt.
Trykker jeg properties på mit projekt står der den kører .net 2.0 framework - Jeg kan lave den om til 3.5 framework i stedet.
Men kigger jeg properties på min System.data siger den at det er version 2.0
using System.Text;
using System.Data.SqlClient;
using System;
using System.Data;
using System.IO;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{
//Declare variables
private string PriceNvarchar;
private int EntryID;
SqlCommand sqlCmd;
SqlConnection sqlConn;
private string SQLDestinationTabel;
private string DestinationDatabase;
IDTSConnectionManager100 connMgr;
public override void AcquireConnections(object Transaction)
{
connMgr = this.Connections.Connection;
sqlConn = (SqlConnection)connMgr.AcquireConnection(null);
}
public override void PreExecute()
{
base.PreExecute();
/*
Add your code here for preprocessing or remove if not needed
*/
}
public override void PostExecute()
{
base.PostExecute();
// Set the Package Variable
Variables.PriceNvarchar = PriceNvarchar;
Variables.EntryID = EntryID;
Variables.SQLDestinationTabel = SQLDestinationTabel;
Variables.SQLDestinationDatabase = DestinationDatabase;
}
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
sqlCmd = new SqlCommand("UPDATE RaptorData.Dbo.VildMedVinCleansedData SET Price ="+ @PriceNvarchar+" where EntryID = "+@EntryID);
}
public override void ReleaseConnections()
{
connMgr.ReleaseConnection(sqlConn);
}
}
Kan i hjælpe??