Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSVariables100)' has some invalid arguments
hi,
outputname :rsresult under outputcolums: customerid
territoryid
accountnumber
customertype
and have mention errors in red color
idtsvariable100 vars;
variabledispenser.lockoneforread("rsresult", vars); // rsresult output name here iam getting error
object rs = vars(0).values; //here getting error
system.data.oledb.oledbdataadapter olead = new system.data.oledb.oledbdataadapter();
system.data.datatable dt = new system.data.datatable();
//system.data.datarow row;
olead.fill(dt, rs);
foreach (datarow row in dt.rows) {
{
rsresultbuffer.addrow();
rsresultbuffer.customerid = (int)row["customerid"];
rsresultbuffer.territoryid = (int)row["territoryid"];
rsresultbuffer.accountnumber = row["accountnumber"].tostring();
rsresultbuffer.customertype = row["customertype"].tostring();
}
rsresultbuffer.setendofrowset();
}
the errors
error 1 best overloaded method match 'microsoft.sqlserver.dts.runtime.wrapper.idtsvariabledispenser100.lockoneforread(string, ref microsoft.sqlserver.dts.runtime.wrapper.idtsvariables100)' has invalid arguments
error 2 argument '2': cannot convert 'microsoft.sqlserver.dts.runtime.wrapper.idtsvariable100' 'ref microsoft.sqlserver.dts.runtime.wrapper.idtsvariables100'
thanks
kedarnath
you missing ref specifier. try this:
variabledispenser.lockoneforread("rsresult", ref vars);
thanks,
bob
SQL Server > SQL Server Integration Services
Comments
Post a Comment