did you try to Save your Stream.Container ?
set tSC = tRequest.%Save()
before
set tSC = ..SendRequestAsync(..TargetConfigNames,tRequest)
- Log in to post comments
did you try to Save your Stream.Container ?
set tSC = tRequest.%Save()
before
set tSC = ..SendRequestAsync(..TargetConfigNames,tRequest)
Did you check your license capacity?
looks like running out of license slots.
my personal rule:
Yeah!
you can lock out developers from SMP.
But you can't prevent them from writing code with similar functionality. And run it.
And then you have the same SYSTEM privileges as your Caché installation has.
It might be hard to block it.
For stronger security block all developers on production systems.
I like the second solution!
really excellent
![]()
#3 in details:
- mount the copy of the DB as an additional DB to your Test Environment READ ONLY.
e.g directory C:\InterSystems\Cache\myCopyDB\
- Using Extended Global References you copy whatever global your need.
e.g. merge ^my.Global = ^|"^^C:\InterSystems\Cache\myCopyDB\"|my.Global
did you try instead of Array Of Objects to use List of Objects ?
(it's different storage structure behind)
see this article
and the related example in OpenExchange
not at all. It's just a readable formatted picture of the executed code.
Ah, got it.
I understand and agree on 7, 8, 9
for 1. I still wait for the "modern" editor.
None of the existing ones could really convince me. But all are easier to handle than vi or X ^% ![]()
normally there is no need for such "wrapper"
typically %Save() returns a %Status object and then it's up to you to analyze it in case there is an error.
In the situation described here, all you can do is just a retry.
- it could be a Lock collision
- or the LockTable is full.
Instead of fiddling in system parameters requiring a restart, you just wait and retry.
if you are curious how often this happens you may add a loop counter. for further decisions
Yes.
it prevents an error message if there is a collision.
if nobody else is around it just falls through without loop.
for an insert you may need and exclusive lock for your table
do {
set gotit=##class(my.class).%LockExtent()
if 'gotit hang .3
} while 'gotit
;; now do your INSERT
and don't forget
do ##class(my.class).%UnLockExtent(0,1)after your insert.
other: XMLSPy for XML/XSD/DTD editing
of course I also use Caché Studio
straight Notepad
Notpad++ especially for JS also some XML if XMLSpy is to heavy
Docs of $G say
| variable | A local variable, global variable, or process-private global variable, subscripted or unsubscripted. The variable may be undefined. variable may be specified as a multidimensional object property with the syntax obj.property. |
similar Docs of $D say
| variable | The variable whose status is to be checked. A local or global variable, subscripted or unsubscripted. The variable may be undefined. You cannot specify a simple object property reference as variable; you can specify a multidimensional property reference as variable with the syntax obj.property. |
but Title in your case is $li(^CinemaooFilmD(3),1). So neither $G() nor $D() is approriate.
misunderstanding:
I suggested to just use that EXAMPLE method to write a HTML structured table.
Variation is in the SQL statement that you pass to it
ClassMethod any(sqlStatement as %string) As %Status {
set query = ##class(%ResultSet).%New() ,
sc = query.Prepare(sqlStatement)
......
}In docs you find Persistent Objects and Caché SQL
especially storage definitions
For more information on the globals used for persistent classes, see “Globals.”
some dirty trick to copy across namespace boundaries:
have a target class config but change the global references in STORAGE section from
^Package.ClassD and ^Package.ClassI to
^|"namespace"|Package.ClassD and ^|"namespace"|Package.ClassI
Might be a different way to work across namespaces
Assuming you get the call string as the variable parameter then
for par="SERVER","PORT","NAMESPACE" set @par=$P($P(parameter,par_"=",2),":") zw @par
SERVER="127.0.0.1"
PORT=1972
NAMESPACE="SAMPLES"Sorry you didn't publish the definition of color .
so assuming it is a $LB( ) structure $LISTTOSTRING(color,',') may cover your needs. It's an SQLFUNCTION too!
just LIST(color) is wrong as it produces a comma-separated list of MULTIPLE records.
you can delete the class in Studio or from SMPortal.
so you delete the class DEFINITION and the related table DEFINITION. but no data.
BUT.
DROP TABLE in SQL also deletes the data AND the definition because this is part of SQL Standard. (Se also MySQL)
I'd suggest you take some time to really read the documentation or consume some online training.
" In MySQL, a "view" is just a saved SQL query - dropping a view does not drop data.
I never imagined dropping the class (which I thought was just a view) would empty the global.
The global was still there, but all the data was gone. "
Caché is different from MySQL but has also VIEWS and dropping a View doesn't touch any Data
But identical as in MySQL DROP TABLE deletes the data.
from http://www.mysqltutorial.org/mysql-drop-table
The DROP TABLE statement removes a table and its data permanently from the database.
and this was your question:
So how else do I drop the table?
and later:
I did one by DDL
if you use DROP without option %NODELDATA your data are gone.
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RSQL_droptable
Short Caché Basics:
so having 3 'tables' on the same global is just having 3 views of the same house.
Recommend readings: Long Caché Basics and Introduction to Caché SQL
IF you have seen the "Light weight Excel" and its Open Exchange Repository
then all you have to do is
- open your file
- use your file
execute OnPage method (from example or your personal variation of it)
- close your file
BINGO!
to make it easier the referred method here:
ClassMethod OnPage() As %Status
{
set sqlStatement="SELECT TOP 23 ID,Name,%ODBCOUT(DOB) DOB,SSN FROM Sample.Person"
,query = ##class(%ResultSet).%New()
,sc = query.Prepare(sqlStatement)
set:sc sc=query.Execute()
quit:'sc sc
set cols=query.GetColumnCount()
write "<table border=1>",!,"<tr>"
for col=1:1:cols {
write "<th align=left><b>"_query.GetColumnHeader(col)_"</b></th>"
}
while query.Next() {
write "</tr>",!,"<tr>"
for col=1:1:cols {
write "<td>"_query.GetData(col)_"</td>"
}
}
write "</tr>",!,"</table>"
quit $$$OK
}OK. I experienced that scenario quite often. ![]()
Suggestion to verify that indices will help you.
- Take a typical class definition, make a copy without storage definition (or remove it)
- compile it with Chaché Default storage and run INSERT INTO new.table SELECT * from old.table a flat table scan
- verify the new table against your needs.
- if it fits then the problem has moved to "update frequency" which might be easier to solve.
It's, of course, limited to the critical tables and not the whole DB
In your case, you have to KILL the underlying globals manually.
As seen in Storage definition
eg. <Global>^SVK</Global> and all others too that you didn't publish
What I've seen so far DDL enabling might not fit your expectations because of that ancient mapping.
(looks like late 80ties or before)
You shouldn't be so much concerned on looping the RecordSet
INSERT ...... SELECT ....
looks smaller and smarter but does basically the same
Well the code you posted shows a rather ancient type of table mapping away from standards.
And the errors you got underlines this as standard methods like %BuildIndices and %PurgeiIndices are not implemented.
I see 3 possible options:
- you find in the code (not necessarily in the class definition) some method to (re) generate the indices.
Without experience with Caché and Object Script a rather impossible task.
- you create a copy of the class definition and move all data there by INSERT INTO new.table SELECT * from old.table
but it is unclear from what you showed to us if INSERT into your table is supported at all
- least risky. you out-comment all broken indices except [IDKEY] and just use a flat table scan.
this is a fast workaround at the price of a poor performance on bigger tables.
honestly. - not a funny situation
You gave the answer already!
By compilation, you DEFINE indexes at their rules.
But you need to generate their content separately by ClassMethod
in each class.
Or from management portal.
.png)
Then they are ready to use.
There is another way directly with SQL
First, you CREATE a temporary table according to your needs (or have it ready)
CREATE GLOBAL TEMPORARY TABLE MyTemp.Table temp1, temp2, . . . . .
Next, you fill it by INSERT directly from SELECT
The select is the same as before.