I haven't specified any path, the process does it automatically  and doesn't allow changing it.

when i done it in 2014 with the same steps it worked and then batch created, then ran batch and database created but still when mounting it, it's mounted as 2k not 8 !!?

anyway, what I've done now is just the old traditional way by exporting all globals from the old 2k, created a fresh new database (8k), then imported the globals in it, but I'm suspecting that GBLOCKCOPY in 2008 having some issues!?

Thanks John

HI John,

I had to run is in 2014 because when I run it in 2008 on Mounted or Unmounted database it gives me following error 

 
Convert 2KB c:\test civicview version 8\data\production\CACHE.DAT => 8KB c:\test civicview version 8\data\production\CACHE.DAT
 
Confirm auto creation of batch VB2? No => Yes
 
Creating directory c:\test civicview version 8\data\production\pre-gbcopy\
ERROR: rename failed with error code 1
Unable to rename c:\test civicview version 8\data\production\pre-gbcopy\CACHE.DAT to c:\test civicview version 8\data\production\CACHE.NEW
Unable to add c:\test civicview version 8\data\production\CACHE.DAT to the batch
 
Batch Name: VB2  0 of 0 Processes running, 0 per directory
 # Source DB=>Destination DB/NS                  Last Update Done/ToDo/Err State
-- ----------------------------                  ----------- ------------- -----
 
Auto creation of batch VB2 complete

Thanks

Hi Guys,

I think the easy way with is to just create an empty Cache.dat then copy all Globals from the old cache to the fresh new one.

I know that can be done by using GBLOCKCOPY  but done know the correct steps?because I tried GBLOCKCOPY , option 1 then option 1 it tells me "No database or database is dismounted in Directory" although there is a dismounted Cache.dat?

Thanks

Hi Guys,

I've Purged all queries using System Management portal and also by running D $SYSTEM.SQL.Purge(), then recompiled all classes with $System.OBJ.CompileAll("c-k-l"), but our Clients are still getting those errors when running Crystals, where I had to open the affected classes in Studio compile them and get the crystals running again. any suggestions please?

Thanks 

Thanks Robert, and that's my understanding as well because in our software we actually stream PDF file in the database and also can restore them as a physical pdf files to read them, but what i though is that the streamed files in the database is a COPY of the physical file that we used first and clearing the stream is only clearing the streamed bytes in the database not the actual original file, but now you mentioned that Clearing the stream will also delete the original physical file, I'll take than into account so that we don't loose any files just in case :)

Thanks Robert. 

Thanks Guys,

Just to be aware, the client is running Cache 2008 so the third parameter can't be used for Rename or Delete, and I think i found the problem, where in my code I'm opening the file as a Stream:

set stream = ##class(%Stream.FileCharacter).%New()
 set stream.Filename = FILEPATH
 while 'stream.AtEnd 
 {
 set LINE = stream.ReadLine()
 If LN>0
 {
 ^UTLV("data",LN)=LINE
 ^UTLV("data")=LN
  }

and the reason why the delete didn't work is because the the file (Stream) is opened.

I tried to close or kill the stream using : stream.Flush(),  stream.%Delete(), stream.%KillExtent() or  CLOSE stream 

and didn't work and if I use stream.Clear() the file will be deleted all together, and I don't want to delete is at this stage, I only want to delete the file after all my processes in finish at the end of my last routine.

so how can i close the stream so that the Delete method can function at the end?

thanks Guys

Sorry I'm lost here. and not sure what you in 1,2 or 3 !?

The above request that I created in Cache was working fine and Posts ok to the required REST API, but then new requirement came up and added two array to it the REST API, and they send me the new JSON structure so I had to do the same to accommodate the change (the JSOM after But the REST API is expecting this JSON request:)!?

the other difference is that Now they also require a Header, before they they only had a Body in their API.  

At first I thought that could be the comma after "]" in my JSON, but looks like is not the case, and I'm also wondering the way I added the header is correct or not? or do I also need to define the Header type to JSON as I did with content (Set Request.ContentType "application/json")?

In your case the first modification I would do is replacing dates with real dates, for example with 2014-01-11.

I think my date is already like that!? do you mean removing the double quotes or changing it to YYYY-DD-MM?

 

 

thanks Eduard