go to post Matjaz Murko · Dec 23, 2021 Hi. I'm using IRISProviderCore21.dll in my .NET 5 apps and it's working fine. Regards,Matjaž
go to post Matjaz Murko · Nov 2, 2021 Hi.Have you tried: Set time15min=$SYSTEM.SQL.Functions.DATEADD("mi",-15,$ZDateTime(now,3)) Regards,Matjaž
go to post Matjaz Murko · Nov 2, 2021 Hi. Tnx for your reply. I'm doing some research/testing with WebSocket to achieve wanted functionality. Regards, Matjaž
go to post Matjaz Murko · Oct 4, 2021 That's the way the proxy classes are functioning (caching). But in new Native API for IRIS there are no proxies, just class methods/functions are called from app and I think, it should be pretty the same as calling this methods/functions from terminal window.
go to post Matjaz Murko · Oct 3, 2021 Hi. As I've mentioned in previous post I'm using workaround, but I think it's a bug in API, because the same method works fine in terminal window without explicite set the objects to null (all used objects are released and consequently all locks are released also - expected behaviour in class with procedure block enabled). Regards,Matjaž
go to post Matjaz Murko · Oct 2, 2021 I'm setting all referenced instances to null in COS to release locks as workaround. But I'm not sure it is a bug or expected behaviour...
go to post Matjaz Murko · Sep 29, 2021 I'm not using IRISObjects, just ClassMethodString: PersonData = JsonSerializer.Deserialize<PersonDataClass>(App.Iris.ClassMethodString("API.Calls.Operative", "Checking", CardNo.Text)); if (PersonData != null) { if (!PersonData.IsValid) { SystemSounds.Exclamation.Play(); }
go to post Matjaz Murko · Sep 29, 2021 Hi.Tnx for reply.Regardless that I'm using ProcedureBlock, Native API calls to class methods do not put instances out of scope (and consequently do not release locks).Regards, Matjaž.
go to post Matjaz Murko · Sep 29, 2021 I do not know if it is important, but I'm using abstract class. And although I explicitly add ProcedureBlock to the class definition it doesn't help when I'm calling the method with Native API...
go to post Matjaz Murko · Sep 29, 2021 These are my findings:- class has ProcedureBlock enabled by default,- if I run the class method from terminal window, it behaves as a procedure block,- if I run it from IRIS Native API (C# app) then it behaves as non procedure block and I have to set person & checking instances to null to release the lock.
go to post Matjaz Murko · Sep 29, 2021 Hi. Tnx for your quick reply. Here is the class method: ClassMethod Checking(CardNo As %String) As %String [ Language = objectscript ]{Set person=##class(MasterData.Person).CardNoOpen(CardNo,4)Quit:person="" "null"Set checking=##class(Production.Checking).%New()Set checking.Person=personSet checking.Condition.Type=person.Condition.TypeSet checking.Condition.ValidBy=person.Condition.ValidBySet checking.ConditionIsValid=(person.Condition.ValidBy>=+$Horolog)Do checking.%Save()Set model=##class(API.Models.Operative.PersonGetData).%New()Set model.Ident=person.IdentSet model.FirstName=person.FirstNameSet model.LastName=person.LastNameSet model.Department=person.Department.NameSet model.IsValid=checking.ConditionIsValidIf ('checking.ConditionIsValid){Set person.Condition.Type="T"Set person.Condition.ValidBy=+$Horolog+6Do person.%Save()}Do model.%JSONExportToString(.json)Do ##class(MasterData.Person).%UnlockId(person.%Id())Quit json} I'm using now %UnlockId method instead of setting the object to null. Regards,Matjaž
go to post Matjaz Murko · Aug 20, 2021 Hi. I'm looking for an example on client side in C# (Xamarin)... Regards, Matjaž.
go to post Matjaz Murko · Aug 13, 2021 Hi. I want to use Native SDK for Java to call class methods. Regards, Matjaž
go to post Matjaz Murko · Aug 5, 2021 Hi. Try this: set RNumber="100" set RowResult=0,Power=1 for i=$LENGTH(RNumber):-1:1 { set RowResult = RowResult + ($EXTRACT(RNumber,i)* Power) set Power = Power * 2 } Regards, Matjaž
go to post Matjaz Murko · Jul 18, 2021 Hi. It means that you make for every property you want do get from IRIS a call to IRIS server? Regards, Matjaž
go to post Matjaz Murko · Jul 17, 2021 Bellow is modified Load method: ClassMethod Load(Ident As %String) As %String [ Language = objectscript ]{Set data=##class(User.Data).%OpenId(Ident)Quit:data="" "null" // OriginalSet model=##class(User.Model).%New()Set model.Ident=data.IdentDo model.PNG.CopyFrom(data.PNG)Do model.%JSONExportToString(.json) Set file=##class(%File).%New("C:\Tmp\1.txt") //Log the json stringDo file.Open("WSN")Do file.Write(json)Do file.Close() // WorkaroundSet model=##class(User.Model).%New()Set model.Ident=data.IdentDo model.%JSONExportToString(.json) // CHANGE in workaroundSet a={}.%FromJSON(json)Do a.%Set("PNG",data.PNG,"stream>base64")// Set file=##class(%File).%New("C:\Tmp\2.txt") //Log the json stringDo file.Open("WSN")Do file.Write(a.%ToJSON())Do file.Close() Quit json} Compare files 1.txt and 2.txt, they are different, but they should be equal. With string recorded in 2.txt c# app doesn't throw the exception.
go to post Matjaz Murko · Jul 17, 2021 Hi. I've tried already with method %JSONExportToStream but C# InterSystems.Data.IRISClient.ADO.IRIS native provider does not have method to return stream. And I checked the string length on server side and client (C#) side - they are the same. As I've already mentioned the workaround in method Load works fine, so the string length is not the problem. Pls check your e-mail for attached PNG. Regards, Matjaž.
go to post Matjaz Murko · Jul 17, 2021 If you let me know your e-mail I can send you the PNG file I'm using to reproduce the error...