go to post David Hockenbroch · May 16, 2022 In addition to the methods already mentioned, a lot of the %Library classes also have a class method called IsValid that you can use. For instance if ##class(%Numeric).IsValid(n) returns a 1, then n is a valid numeric value.
go to post David Hockenbroch · May 12, 2022 Are you sure you copied in the right SQL queries in your post? The ones you've included both try to update the EmailOptIn column to 0 where it's already set to 1, not where it's null. It seems to be they should be something more like "update Person set EmailOptIn = 0 where EmailOptIn is null".
go to post David Hockenbroch · May 9, 2022 Are you just trying to get the json contained in a character stream into a string a vice versa? If so, just read and write to and from the stream: set json = "" while 'stream.AtEnd { set json = json_stream.Read() } That should get you the contents of the stream into a string. do stream.Write(json) That should write the json to a stream. Or is that not what you're trying to do?
go to post David Hockenbroch · May 5, 2022 Methods that return a %Status don't automatically throw an exception. You have to check if the %Status is an error and throw it yourself. After your SendFormDataURL call, you might want to add the following and see if that gives you any more information: if $$$ISERR(st) { throw ##class(%Exception.StatusException).CreateFromStatus(st) } However given that the HTTP status of the response is a 500 (an internal server error) there may also be a problem on that end.
go to post David Hockenbroch · Apr 27, 2022 There isn't a hard limit on the number of tasks, but you may run into licensing issues. As you set them up, you choose the user they run as, so if that user has too many connections going at once, or if they're run as more different users than you have licenses for, there could be an issue.
go to post David Hockenbroch · Apr 5, 2022 I'm not sure your question is clear, but creating a new instance of that class in ObjectScript should be as simple as: set myDTL = ##class(Ens.DataTransformDTL).%New()
go to post David Hockenbroch · Apr 1, 2022 Once you know the pid, try: set process = ##class(%SYS.ProcessQuery).%OpenId(pid) Then check process.Routine, or process.CurrentLineAndRoutine.
go to post David Hockenbroch · Feb 28, 2022 Unless I'm setting type=1, I do need the user's password still to do this, right?
go to post David Hockenbroch · Feb 18, 2022 Here's how I've been doing this: //Read in content from the HttpRequest set req = %request.Content.Read() //Convert content from JSON to a dynamic object set reqObj = {}.%FromJSON(req) //Access data from within the new dynamic object set userName = reqObj.%Get("UserName")
go to post David Hockenbroch · Feb 11, 2022 Eduard, can't the MAXSTRING one also mean that you've exceeded a specified MAXLEN parameter on a string? Like if I have a Property LastName As %String (MAXLEN = 30) and you try to save the object with a 50 character last name, doesn't that also give a "MAXSTRING" error?
go to post David Hockenbroch · Feb 8, 2022 Why not do this? set rset1 = ##class(%ResultSet).%New() set query = "Select statment" set sc = rset1.Prepare(query) set:+sc sc = rset1.Execute(parm1, parm2) set ^sql = query
go to post David Hockenbroch · Feb 7, 2022 Have you checked the security settings for the user you're logging in as? You should have %Developer and %DB_USER, I think. Or if you have %All, that works too.
go to post David Hockenbroch · Feb 1, 2022 Are you trying for the Cache driver, or the IRIS driver? I'm pretty sure the 3.0.0 jar you're using is an IRIS driver, and in that case, the driver is com.intersystems.jdbc.IRISDriver, not com.intersys.jdbc.CacheDriver (note that in that transition, the beginning of the package changed from com.intersys to com.intersystems.)
go to post David Hockenbroch · Jan 17, 2022 I've never done that, but if you add it as a menu item, can you then go to View -> Toolbars -> Customize and find it in the commands tab? And if so, can you drag it to the toolbar you want it on from there?
go to post David Hockenbroch · Jan 12, 2022 Depending on your needs, you might consider creating a class that extends both %Net.HttpRequest and %JSON.Adaptor and using the %JSON.Adaptor methods to create a JSON representation of the instance. That would be easier to analyze.
go to post David Hockenbroch · Jan 11, 2022 Your result.HttpResponse.Data can be either a string or a stream object. If it's a stream object you'll have to handle it a little bit differently using result.HttpResponse.Data.Read(): set response=result.HttpResponse.Data.Read() while 'result.HttpResponse.Data.AtEnd{ set response = response_result.HttpResponse.Data.Read() }
go to post David Hockenbroch · Jan 7, 2022 This is a long shot, but is the ODBC connection defined in User DSN or System DSN? We had an issue after a recent round of Windows updates where Excel suddenly wasn't always correctly seeing the System DSN connection, and setting it up under User DSN instead resolved that issue.
go to post David Hockenbroch · Jan 7, 2022 Here is some useful documentation. You're going to want to make a class that extends %CSP.REST and set up an application that uses that class as its dispatch class. You'll have a URL map in that class to tell IRIS or Cache what to do with the request. Depending on your specific application, you might also want to get familiar with using %request and %response in that process.
go to post David Hockenbroch · Dec 22, 2021 If you're using the IRIS ODBC driver, try switching to the IRIS ODBC35 driver. This kind of error may mean that the application is expecting the driver to do some ODBC 3.x stuff that the older driver might not be capable of.
go to post David Hockenbroch · Dec 22, 2021 The ones in italics are the ones that are a part of your current project. If you click on the Project tab, they'll show up there too.