go to post Stefan Rieger · Jan 18, 2023 this always happens when you call Methods who try to "output" something to a stream other than the internal .net message stream - very much Methods do that to signal status and progress with the terminal. Fortunately some of them can be forced to behave silent - e.g. For the Method %SYSTEM.OBJ.Load you must provide qspec with argument "/display=none" hope that helps
go to post Stefan Rieger · Mar 30, 2022 my guess was is it should be possible with any (os matching) iris/ cache - your intention is to remotely access the databases on the nas? if you don't directly mount the database via filesystem (i'm not going to do that, too big fear from latency) you anyway have to have a installed db server on the NAS System to enable advanced features (don't know the name ist it ecp protocoll?)
go to post Stefan Rieger · Mar 30, 2022 obviously did understand the question quite well ;-) - already thought about the possibility with docker. The other possibility i was wondering was not VM but install that directly. Qnap (my Station) is based on Linux so theoretically shouldn't be impossible; My guess that this could become quite compilicated as the OS probably is very customized
go to post Stefan Rieger · Jan 4, 2022 have no words.... feel ashame that i ditn't tried that - thanks very much
go to post Stefan Rieger · Jan 3, 2022 my guess was that there migth be a little hack like calling stored procedures with brackets (which is not mentioned in any documentation): "{ call %SYSTEM.SQL_GetROWID()" doesn't anybody have an idea on that?
go to post Stefan Rieger · Jan 3, 2022 this is the exception InterSystems.Data.CacheClient.CacheException (0x80004005): [SQLCODE: <-1>:<Ungültige SQL-Anweisung >][Location: <Prepare>][%msg: < IN erwartet, <Ende des Ausdrucks> gefunden ^LOCK TABLE Appliance . Setting>] bei InterSystems.Data.CacheClient.CacheADOConnection.GetServerError(Int32 rc) bei InterSystems.Data.CacheClient.CacheADOConnection.processError(Int32 error, Int32 allowError) bei InterSystems.Data.CacheClient.InStream.readHeader(CacheCommand stmt, Int32 stmt_id, Int32 type, Int32 allowError, Boolean requestData) bei InterSystems.Data.CacheClient.InStream.readHeader(CacheCommand stmt, Int32 type, Int32 allowError) bei InterSystems.Data.CacheClient.CacheCommand.sendDirectUpdateRequest() bei InterSystems.Data.CacheClient.CacheCommand.Execute() bei InterSystems.Data.CacheClient.CacheCommand.ExecuteReaderObject(CommandBehavior behavior, String method) bei InterSystems.Data.CacheClient.CacheCommand.internalExecuteNonQuery() bei InterSystems.Data.CacheClient.CacheCommand.ExecuteNonQuery()
go to post Stefan Rieger · Jan 3, 2022 did not set any dialect - unfortunately that did not help ;-( i'm afraid i didn't get your point "not part of IRIS SQL"? - reading the Documentation i thought it is (pls. keep in mind that this command can be invoked via embedded sql - and ahead i also can invoke that succesfully from my little sql-tool.
go to post Stefan Rieger · Dec 28, 2021 Hi Nigel, thanks - but my question was especially HOW a working LOCK TABLE Command with a .Net Provider CacheCommand would look like - i couldn't get that to work.. Locking a table via my Sql Tool (Database.Net) just works fine so obviously there is a way?
go to post Stefan Rieger · Jul 19, 2021 hi matjaz, no - maybew that was misleading; i just store and retrieve byte arrays directly to fields defined as %Stream.GlobalBinary and do the encoding and serialization stuff with .net
go to post Stefan Rieger · Jul 18, 2021 just for curiosity: i do the same thing by cutting off the iris stuff completely; Is there any reason taht you let iris store the convert, store and convert back instead of just sending binary data to iris directly? it's so much easier if you let c# pack the json string to byte[] and deserialize that....
go to post Stefan Rieger · Jul 15, 2021 is it possible that you're missing the "Ens* Routine" mapping from Database Enslib to the namespace you're working in? (have a look to System/Configuration/Namespaces within Administration Portal)
go to post Stefan Rieger · Jul 14, 2021 the first two might be a bit off topic - this points more or less to .net architectural decisions. if you want email me directly (s-rieger@gmx.net) and i try to give you some hints. 3.: Did not look into that deep - do you have an example on which method you really need that?
go to post Stefan Rieger · Jul 13, 2021 public class TestClass : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public string Test { set { if (_test != value) { _test = value; PropertyChanged?.Invoke(this, nameof(Test)); } } get { return _test; } } string _test; }
go to post Stefan Rieger · Jul 13, 2021 i'm not sure if understood correctly, but for .net this normally is done like that:
go to post Stefan Rieger · Jul 13, 2021 yes, that sounds for me like tracing to the database writer - i'm not aware of this functionality in any database at all. keep in mind that changing a database field depends on several factors - if you're in a transaction it might look for the client who's running the update like the field is changed, for others not; If transaction fails the field content will be rolled back. the "normal" way is just to poll the property regularly to see if it's been changed
go to post Stefan Rieger · Jul 13, 2021 i'm not sure if i understood rigth - your'e talking about a event listener on a database field change? (keep in mind, that the properties content is a database field which potentially could be changed by cos, sql or even direct global access)?
go to post Stefan Rieger · Jul 12, 2021 [Test] public void pcg() { using (var conn = ConnectionFactory.CreateConnection() as IRISADOConnection) { conn.ChangeNs("\"USER\""); var tc = new TestClass(conn); tc.MyProperty = "FuzziGagga"; tc.Save(); Assert.NotNull(tc.Id); var id = tc.Id.Value; tc = new TestClass(conn, id); var myProp = tc.MyProperty; Assert.True(myProp == "FuzziGagga"); } }
go to post Stefan Rieger · Jul 12, 2021 public class TestClass : IDisposable { public TestClass(IRISADOConnection conn, int idValue) { iris = IRIS.CreateIRIS(conn); proxy = (IRISObject)iris.ClassMethodObject("User.MyClass", "%OpenId", idValue); Id = idValue; } public TestClass(IRISADOConnection conn) { iris = IRIS.CreateIRIS(conn); proxy = (IRISObject)iris.ClassMethodObject("User.MyClass", "%New"); } public void Save() { int related = 1; proxy.InvokeIRISStatusCode("%Save", related); if (!Id.HasValue) { Id = (int)proxy.InvokeLong("%Id"); } } public string MyProperty { set { proxy.Set(nameof(MyProperty), value); } get { return proxy.GetString(nameof(MyProperty)); } } internal int? Id; IRISObject proxy; IRIS iris; public void Dispose() { iris.Close(); } }