Open peans99 opened 6 hours ago
Hi peans99,
Could you test the same with the proper version of Ezapi Package? In my profile I have multiple Ezapi repositories one per SqlServer major version. So if you are using SQL Server 2019 try to check first the Ezapi 2019. Or are you talking about Ezapi version already?
I am testing with your version SQLServer2022EzApi. the 2019 version also failed with sql 2019
I did some additional test and its really weird. if I use a dynamic variable it work
var test2 = Comp as IDTSManagedComponent100;
var test3 = test2.InnerObject;
test3.PutSourceCode(fileName, VSTAScriptProjectStorage.Encoding.UTF8.ToString(), srcCode);
host.PutSourceCode(fileName, VSTAScriptProjectStorage.Encoding.UTF8.ToString(), srcCode);
It work using : https://github.com/fpvmorais/EzApi2016 , your 2019 didnt work. I am still running additional test
Let me try your 2016 with my sql 2016 to see if its something between your version and fpvmorais version
your 2016 version also work but not 2019 and 2022 this is a weird one.
so I got it working by changing this . I dont know why the wrapper don't work past 2016
private dynamic host
{
get
{
return (Comp as IDTSManagedComponent100).InnerObject;
}
}
public dynamic ScriptingEngine
{
get
{
return host.CurrentScriptingEngine;
}
}
https://github.com/peans99/SQLServer2022EzApi/commit/5f3df5487fff5f5982a585d48f92870216eec046
example is here it work me for me now . It just a weird weird issue I don't know whats happening that can create this in the com wrapper
Line 2259: of ezComponent.
private ScriptComponentHost host { get { return (Comp as IDTSManagedComponent100).InnerObject as ScriptComponentHost; } }
I noticed it work with the version of 2016 stopped working with the 2019 version. I am not sure if its a bug in microsoft implementation but this break the script component